mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Actually fixed BlockCracker + One more type of block can be cracked
This commit is contained in:
parent
76ca7cc88f
commit
e6c9cc6fdd
@ -1,5 +1,7 @@
|
|||||||
Version 2.1.110
|
Version 2.1.110
|
||||||
Fixed a dupe bug
|
Fixed a dupe bug
|
||||||
|
Actually fixed Block Cracker
|
||||||
|
You can now crack Infested Stone Bricks with Block Cracker
|
||||||
Added Lithuanian locale (thanks Vyciokazz)
|
Added Lithuanian locale (thanks Vyciokazz)
|
||||||
|
|
||||||
Version 2.1.109
|
Version 2.1.109
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.gmail.nossr50.listeners;
|
package com.gmail.nossr50.listeners;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.config.HiddenConfig;
|
import com.gmail.nossr50.config.HiddenConfig;
|
||||||
import com.gmail.nossr50.config.WorldBlacklist;
|
import com.gmail.nossr50.config.WorldBlacklist;
|
||||||
@ -588,7 +589,7 @@ public class BlockListener implements Listener {
|
|||||||
blockState.update(true);
|
blockState.update(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (mcMMOPlayer.getAbilityMode(SuperAbilityType.BERSERK) && heldItem.getType() == Material.AIR) {
|
else if (mcMMOPlayer.getAbilityMode(SuperAbilityType.BERSERK) && (heldItem.getType() == Material.AIR || Config.getInstance().getUnarmedItemsAsUnarmed())) {
|
||||||
if (mcMMOPlayer.getUnarmedManager().canUseBlockCracker() && BlockUtils.affectedByBlockCracker(blockState)) {
|
if (mcMMOPlayer.getUnarmedManager().canUseBlockCracker() && BlockUtils.affectedByBlockCracker(blockState)) {
|
||||||
if (EventUtils.simulateBlockBreak(block, player, true) && mcMMOPlayer.getUnarmedManager().blockCrackerCheck(blockState)) {
|
if (EventUtils.simulateBlockBreak(block, player, true) && mcMMOPlayer.getUnarmedManager().blockCrackerCheck(blockState)) {
|
||||||
blockState.update();
|
blockState.update();
|
||||||
|
@ -92,7 +92,14 @@ public class UnarmedManager extends SkillManager {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
blockState.setType(Material.CRACKED_STONE_BRICKS);
|
blockState.getBlock().setType(Material.CRACKED_STONE_BRICKS);
|
||||||
|
return true;
|
||||||
|
case INFESTED_STONE_BRICKS:
|
||||||
|
if (!Unarmed.blockCrackerSmoothBrick) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockState.getBlock().setType(Material.INFESTED_CRACKED_STONE_BRICKS);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user