mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 10:14:43 +02:00
Actually fixed BlockCracker + One more type of block can be cracked
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
package com.gmail.nossr50.listeners;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.HiddenConfig;
|
||||
import com.gmail.nossr50.config.WorldBlacklist;
|
||||
@ -588,7 +589,7 @@ public class BlockListener implements Listener {
|
||||
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 (EventUtils.simulateBlockBreak(block, player, true) && mcMMOPlayer.getUnarmedManager().blockCrackerCheck(blockState)) {
|
||||
blockState.update();
|
||||
|
@ -92,7 +92,14 @@ public class UnarmedManager extends SkillManager {
|
||||
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;
|
||||
|
||||
default:
|
||||
|
Reference in New Issue
Block a user