don't invoke skyseeker's axe if holding shift

Closes #296
This commit is contained in:
Ell 2023-02-05 15:52:40 +01:00
parent fe71e62ad4
commit 3b16db7389

View file

@ -47,11 +47,9 @@ public class ItemAxe extends AxeItem implements IModItem, ICustomItemModel {
@Override
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, Player player) {
if (itemstack.getItem() == ModItems.SKY_AXE) {
if (player.level.getBlockState(pos).is(BlockTags.LOGS)) {
BlockEntityWoodStand.recurseTreeDestruction(player.level, pos, pos, false, true);
return true;
}
if (itemstack.getItem() == ModItems.SKY_AXE && !player.isShiftKeyDown() && player.level.getBlockState(pos).is(BlockTags.LOGS)) {
BlockEntityWoodStand.recurseTreeDestruction(player.level, pos, pos, false, true);
return true;
}
return false;
}