From f84e98d8366bba5a67220b55d61efe0f3a075126 Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Wed, 4 Nov 2015 15:27:03 -0500 Subject: [PATCH] Simulate block break for flux mining. Fixes #2668 --- .../com/gmail/nossr50/skills/smelting/SmeltingManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java b/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java index 19dcc97f9..a38fa7daa 100644 --- a/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java @@ -25,6 +25,7 @@ import com.gmail.nossr50.skills.SkillManager; import com.gmail.nossr50.skills.mining.Mining; import com.gmail.nossr50.skills.smelting.Smelting.Tier; import com.gmail.nossr50.util.BlockUtils; +import com.gmail.nossr50.util.EventUtils; import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.skills.ParticleEffectUtils; @@ -73,6 +74,10 @@ public class SmeltingManager extends SkillManager { if (item == null) { return false; } + + if (!EventUtils.simulateBlockBreak(blockState.getBlock(), player, true)) { + return false; + } // We need to distribute Mining XP here, because the block break event gets cancelled applyXpGain(Mining.getBlockXp(blockState), XPGainReason.PVE);