mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-09-05 12:45:34 +02:00
expand Block Cracker to other blocks with cracked variants
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
Version 2.2.041
|
||||
Fixed Berserk failing to crack blocks
|
||||
Added 'Skills.Unarmed.Block_Cracker.Allow_Block_Cracker' to config.yml
|
||||
Removed 'SmoothBrick_To_CrackedBrick', it has been replaced by `Allow_Block_Cracker`
|
||||
Block Cracker can now crack deepslate bricks, deepslate tiles, polished blackstone bricks, and netherbricks
|
||||
Optimizations for Hoppers & Alchemy (thanks Warriorrrr)
|
||||
Fixed buckets being consumed by furnaces (thanks RunqRun)
|
||||
Fixed Repair stripping unsafe enchantments from items (thanks Techirion)
|
||||
|
@@ -872,8 +872,8 @@ public class GeneralConfig extends BukkitConfig {
|
||||
}
|
||||
|
||||
/* Unarmed */
|
||||
public boolean getUnarmedBlockCrackerSmoothbrickToCracked() {
|
||||
return config.getBoolean("Skills.Unarmed.Block_Cracker.SmoothBrick_To_CrackedBrick", true);
|
||||
public boolean isBlockCrackerAllowed() {
|
||||
return config.getBoolean("Skills.Unarmed.Block_Cracker.Allow_Block_Cracker", true);
|
||||
}
|
||||
|
||||
public boolean getUnarmedItemPickupDisabled() {
|
||||
|
@@ -83,6 +83,9 @@ public class UnarmedManager extends SkillManager {
|
||||
}
|
||||
|
||||
public void blockCrackerCheck(@NotNull Block block) {
|
||||
if (!mcMMO.p.getGeneralConfig().isBlockCrackerAllowed()) {
|
||||
return;
|
||||
}
|
||||
if (!ProbabilityUtil.isNonRNGSkillActivationSuccessful(SubSkillType.UNARMED_BLOCK_CRACKER,
|
||||
mmoPlayer)) {
|
||||
return;
|
||||
@@ -90,19 +93,23 @@ public class UnarmedManager extends SkillManager {
|
||||
|
||||
switch (block.getType()) {
|
||||
case STONE_BRICKS:
|
||||
if (!Unarmed.blockCrackerSmoothBrick) {
|
||||
return;
|
||||
}
|
||||
|
||||
block.setType(Material.CRACKED_STONE_BRICKS);
|
||||
return;
|
||||
case INFESTED_STONE_BRICKS:
|
||||
if (!Unarmed.blockCrackerSmoothBrick) {
|
||||
return;
|
||||
}
|
||||
|
||||
block.setType(Material.INFESTED_CRACKED_STONE_BRICKS);
|
||||
return;
|
||||
case DEEPSLATE_BRICKS:
|
||||
block.setType(Material.CRACKED_DEEPSLATE_BRICKS);
|
||||
return;
|
||||
case DEEPSLATE_TILES:
|
||||
block.setType(Material.CRACKED_DEEPSLATE_TILES);
|
||||
return;
|
||||
case POLISHED_BLACKSTONE_BRICKS:
|
||||
block.setType(Material.CRACKED_POLISHED_BLACKSTONE_BRICKS);
|
||||
return;
|
||||
case NETHER_BRICKS:
|
||||
block.setType(Material.CRACKED_NETHER_BRICKS);
|
||||
return;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
@@ -460,7 +460,7 @@ Skills:
|
||||
Enabled_For_PVE: true
|
||||
Level_Cap: 0
|
||||
Block_Cracker:
|
||||
SmoothBrick_To_CrackedBrick: true
|
||||
Allow_Block_Cracker: true
|
||||
# When using Unarmed, picked up items will automatically get moved to a free slot instead of going in the slot
|
||||
# of your hand. Should item pickup be disabled when your entire inventory - except for your hand - is full?
|
||||
Item_Pickup_Disabled_Full_Inventory: true
|
||||
|
Reference in New Issue
Block a user