mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-30 00:56:47 +01:00
Simulate block break for flux mining. Fixes #2668
This commit is contained in:
parent
7e92905618
commit
f84e98d836
@ -25,6 +25,7 @@ import com.gmail.nossr50.skills.SkillManager;
|
|||||||
import com.gmail.nossr50.skills.mining.Mining;
|
import com.gmail.nossr50.skills.mining.Mining;
|
||||||
import com.gmail.nossr50.skills.smelting.Smelting.Tier;
|
import com.gmail.nossr50.skills.smelting.Smelting.Tier;
|
||||||
import com.gmail.nossr50.util.BlockUtils;
|
import com.gmail.nossr50.util.BlockUtils;
|
||||||
|
import com.gmail.nossr50.util.EventUtils;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
||||||
@ -74,6 +75,10 @@ public class SmeltingManager extends SkillManager {
|
|||||||
return false;
|
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
|
// We need to distribute Mining XP here, because the block break event gets cancelled
|
||||||
applyXpGain(Mining.getBlockXp(blockState), XPGainReason.PVE);
|
applyXpGain(Mining.getBlockXp(blockState), XPGainReason.PVE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user