From 9e0ce03580c21a6938fa8f1b4359fa8d78b9d0af Mon Sep 17 00:00:00 2001 From: Flanks255 <32142731+Flanks255@users.noreply.github.com> Date: Tue, 4 Jun 2024 13:36:41 -0500 Subject: [PATCH] Fixes --- .../mod/inventory/gui/FilterSettingsGui.java | 4 ++-- .../actuallyadditions/mod/items/AllInOneTool.java | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java index f96945ce9..cc48ee7ba 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java @@ -112,11 +112,11 @@ public class FilterSettingsGui { ? Component.translatable("info.actuallyadditions.gui.respectMod") : Component.translatable("info.actuallyadditions.gui.ignoreMod")).withStyle(ChatFormatting.BOLD)); list.add(Component.translatable("info.actuallyadditions.gui.respectModInfo")); - } else if (this.modButton.isMouseOver(mouseX, mouseY)) { + } else if (this.damageButton.isMouseOver(mouseX, mouseY)) { list.add((this.theSettings.matchDamage ? Component.translatable("info.actuallyadditions.gui.respectDamage") : Component.translatable("info.actuallyadditions.gui.ignoreDamage")).withStyle(ChatFormatting.BOLD)); - } else if (this.modButton.isMouseOver(mouseX, mouseY)) { + } else if (this.nbtButton.isMouseOver(mouseX, mouseY)) { list.add((this.theSettings.matchNBT ? Component.translatable("info.actuallyadditions.gui.respectNBT") : Component.translatable("info.actuallyadditions.gui.ignoreNBT")).withStyle(ChatFormatting.BOLD)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java index 0d8be9f05..3a71237a4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java @@ -24,7 +24,8 @@ public class AllInOneTool extends DiggerItem { ToolActions.PICKAXE_DIG, ToolActions.SHOVEL_DIG, ToolActions.HOE_TILL, - ToolActions.SHOVEL_FLATTEN + ToolActions.SHOVEL_FLATTEN, + ToolActions.AXE_STRIP ); public AllInOneTool(Tier tier) { @@ -56,13 +57,13 @@ public class AllInOneTool extends DiggerItem { } // Player not sneaking? Act as a Hoe to the block, else, Act as a shovel - if (!context.getPlayer().isCrouching()) { - BlockState toolModifiedState = context.getLevel().getBlockState(context.getClickedPos()).getToolModifiedState(context, ToolActions.HOE_TILL, false); - ActuallyAdditions.LOGGER.info("Tool Modified State: " + toolModifiedState); - return Items.IRON_HOE.useOn(context); + if (context.getPlayer().isCrouching()) { + return Items.IRON_SHOVEL.useOn(context); } - - return Items.IRON_SHOVEL.useOn(context); + InteractionResult tmp = Items.IRON_AXE.useOn(context); + if (tmp != InteractionResult.SUCCESS) + return tmp; + return Items.IRON_HOE.useOn(context); } @Override