Actually fixed BlockCracker + One more type of block can be cracked

This commit is contained in:
nossr50 2019-10-18 15:48:12 -07:00
parent 76ca7cc88f
commit e6c9cc6fdd
3 changed files with 12 additions and 2 deletions

View File

@ -1,5 +1,7 @@
Version 2.1.110
Fixed a dupe bug
Actually fixed Block Cracker
You can now crack Infested Stone Bricks with Block Cracker
Added Lithuanian locale (thanks Vyciokazz)
Version 2.1.109

View File

@ -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();

View File

@ -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: