diff --git a/gradle.properties b/gradle.properties index e3ca157..0e38ccb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,4 +15,4 @@ botania=1.18.2-430-SNAPSHOT jei_version=jei-1.18.2:9.5.0.132 version_major=2 -version_minor=7 \ No newline at end of file +version_minor=9 \ No newline at end of file diff --git a/src/main/java/thetadev/constructionwand/wand/WandJob.java b/src/main/java/thetadev/constructionwand/wand/WandJob.java index b35f6f6..b294afa 100644 --- a/src/main/java/thetadev/constructionwand/wand/WandJob.java +++ b/src/main/java/thetadev/constructionwand/wand/WandJob.java @@ -1,8 +1,8 @@ package thetadev.constructionwand.wand; import net.minecraft.core.BlockPos; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundSource; +import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; @@ -99,7 +99,7 @@ public class WandJob // If the item cant be taken, undo the placement if(wandSupplier.takeItemStack(snapshot.getRequiredItems()) == 0) { executed.add(snapshot); - wand.hurt(1, player.getRandom(), (ServerPlayer) player); + wand.hurtAndBreak(1, player, e -> e.broadcastBreakEvent(InteractionHand.MAIN_HAND)); } else { ConstructionWand.LOGGER.info("Item could not be taken. Remove block: " +