Fixes for AdvancedJackhammer AOE mining. Closes #1935

This commit is contained in:
drcrazy 2019-12-30 14:26:19 +03:00
parent 52de2fc59f
commit 6d514766ed
2 changed files with 5 additions and 1 deletions

View file

@ -27,6 +27,7 @@ package techreborn.init;
import net.fabricmc.fabric.api.block.FabricBlockSettings;
import net.minecraft.block.Block;
import net.minecraft.block.Material;
import net.minecraft.block.OreBlock;
import net.minecraft.entity.EntityType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemConvertible;
@ -325,7 +326,7 @@ public class TRContent {
Ores(int veinSize, int veinsPerChunk, int minY, int maxY) {
name = this.toString().toLowerCase(Locale.ROOT);
block = new Block(FabricBlockSettings.of(Material.STONE).strength(2f, 2f).build());
block = new OreBlock(FabricBlockSettings.of(Material.STONE).strength(2f, 2f).build());
this.veinSize = veinSize;
this.veinsPerChunk = veinsPerChunk;
this.minY = minY;

View file

@ -129,6 +129,9 @@ public class AdvancedJackhammerItem extends JackhammerItem {
if (blockState.getBlock() instanceof OreBlock){
return false;
}
if (blockState.getBlock() instanceof RedstoneOreBlock){
return false;
}
return (Items.IRON_PICKAXE.isEffectiveOn(blockState));
}