Simulate block break for flux mining. Fixes #2668

This commit is contained in:
t00thpick1 2015-11-04 15:27:03 -05:00
parent 7e92905618
commit f84e98d836

View File

@ -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;
@ -74,6 +75,10 @@ public class SmeltingManager extends SkillManager {
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);