From 6d514766ed6a2e15383a3118d2aeef0960717d3c Mon Sep 17 00:00:00 2001 From: drcrazy Date: Mon, 30 Dec 2019 14:26:19 +0300 Subject: [PATCH] Fixes for AdvancedJackhammer AOE mining. Closes #1935 --- src/main/java/techreborn/init/TRContent.java | 3 ++- .../techreborn/items/tool/advanced/AdvancedJackhammerItem.java | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/techreborn/init/TRContent.java b/src/main/java/techreborn/init/TRContent.java index e74979cc4..1b95e2a15 100644 --- a/src/main/java/techreborn/init/TRContent.java +++ b/src/main/java/techreborn/init/TRContent.java @@ -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; diff --git a/src/main/java/techreborn/items/tool/advanced/AdvancedJackhammerItem.java b/src/main/java/techreborn/items/tool/advanced/AdvancedJackhammerItem.java index bb6614d5c..89d091cfc 100644 --- a/src/main/java/techreborn/items/tool/advanced/AdvancedJackhammerItem.java +++ b/src/main/java/techreborn/items/tool/advanced/AdvancedJackhammerItem.java @@ -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)); }