This commit is contained in:
Flanks255 2024-06-04 13:36:41 -05:00
parent 4d3ba552eb
commit 9e0ce03580
2 changed files with 10 additions and 9 deletions

View file

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

View file

@ -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,14 +57,14 @@ 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);
}
InteractionResult tmp = Items.IRON_AXE.useOn(context);
if (tmp != InteractionResult.SUCCESS)
return tmp;
return Items.IRON_HOE.useOn(context);
}
@Override
public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) {