mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Custom blocks should now work right with Super Breaker.
This commit is contained in:
parent
d17fe6bb7a
commit
efcc15d89d
@ -250,37 +250,7 @@ public class Mining {
|
||||
int durabilityLoss = Config.getInstance().getAbilityToolDamage();
|
||||
FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player);
|
||||
|
||||
switch (type) {
|
||||
case OBSIDIAN:
|
||||
if (tier < 4) {
|
||||
return;
|
||||
}
|
||||
durabilityLoss = durabilityLoss * 5; //Obsidian needs to do more damage than normal
|
||||
/* FALL THROUGH */
|
||||
|
||||
case DIAMOND_ORE:
|
||||
case GLOWING_REDSTONE_ORE:
|
||||
case GOLD_ORE:
|
||||
case LAPIS_ORE:
|
||||
case REDSTONE_ORE:
|
||||
if (tier < 3) {
|
||||
return;
|
||||
}
|
||||
/* FALL THROUGH */
|
||||
|
||||
case IRON_ORE:
|
||||
if (tier < 2) {
|
||||
return;
|
||||
}
|
||||
/* FALL THROUGH */
|
||||
|
||||
case COAL_ORE:
|
||||
case ENDER_STONE:
|
||||
case GLOWSTONE:
|
||||
case MOSSY_COBBLESTONE:
|
||||
case NETHERRACK:
|
||||
case SANDSTONE:
|
||||
case STONE:
|
||||
if (Config.getInstance().getBlockModsEnabled() && CustomBlocksConfig.getInstance().customItems.contains(new ItemStack(block.getTypeId(), 1, (short) 0, block.getData()))) {
|
||||
if (mcMMO.placeStore.isTrue(block)) {
|
||||
return;
|
||||
}
|
||||
@ -294,5 +264,51 @@ public class Mining {
|
||||
SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());
|
||||
}
|
||||
}
|
||||
else {
|
||||
switch (type) {
|
||||
case OBSIDIAN:
|
||||
if (tier < 4) {
|
||||
return;
|
||||
}
|
||||
durabilityLoss = durabilityLoss * 5; //Obsidian needs to do more damage than normal
|
||||
/* FALL THROUGH */
|
||||
|
||||
case DIAMOND_ORE:
|
||||
case GLOWING_REDSTONE_ORE:
|
||||
case GOLD_ORE:
|
||||
case LAPIS_ORE:
|
||||
case REDSTONE_ORE:
|
||||
if (tier < 3) {
|
||||
return;
|
||||
}
|
||||
/* FALL THROUGH */
|
||||
|
||||
case IRON_ORE:
|
||||
if (tier < 2) {
|
||||
return;
|
||||
}
|
||||
/* FALL THROUGH */
|
||||
|
||||
case COAL_ORE:
|
||||
case ENDER_STONE:
|
||||
case GLOWSTONE:
|
||||
case MOSSY_COBBLESTONE:
|
||||
case NETHERRACK:
|
||||
case SANDSTONE:
|
||||
case STONE:
|
||||
if (mcMMO.placeStore.isTrue(block)) {
|
||||
return;
|
||||
}
|
||||
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
Skills.abilityDurabilityLoss(player.getItemInHand(), durabilityLoss);
|
||||
|
||||
miningBlockCheck(player, block);
|
||||
|
||||
if (Config.getInstance().spoutEnabled) {
|
||||
SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user