mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 07:13:28 +01:00
Fixes
This commit is contained in:
parent
4d3ba552eb
commit
9e0ce03580
2 changed files with 10 additions and 9 deletions
|
@ -112,11 +112,11 @@ public class FilterSettingsGui {
|
||||||
? Component.translatable("info.actuallyadditions.gui.respectMod")
|
? Component.translatable("info.actuallyadditions.gui.respectMod")
|
||||||
: Component.translatable("info.actuallyadditions.gui.ignoreMod")).withStyle(ChatFormatting.BOLD));
|
: Component.translatable("info.actuallyadditions.gui.ignoreMod")).withStyle(ChatFormatting.BOLD));
|
||||||
list.add(Component.translatable("info.actuallyadditions.gui.respectModInfo"));
|
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
|
list.add((this.theSettings.matchDamage
|
||||||
? Component.translatable("info.actuallyadditions.gui.respectDamage")
|
? Component.translatable("info.actuallyadditions.gui.respectDamage")
|
||||||
: Component.translatable("info.actuallyadditions.gui.ignoreDamage")).withStyle(ChatFormatting.BOLD));
|
: 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
|
list.add((this.theSettings.matchNBT
|
||||||
? Component.translatable("info.actuallyadditions.gui.respectNBT")
|
? Component.translatable("info.actuallyadditions.gui.respectNBT")
|
||||||
: Component.translatable("info.actuallyadditions.gui.ignoreNBT")).withStyle(ChatFormatting.BOLD));
|
: Component.translatable("info.actuallyadditions.gui.ignoreNBT")).withStyle(ChatFormatting.BOLD));
|
||||||
|
|
|
@ -24,7 +24,8 @@ public class AllInOneTool extends DiggerItem {
|
||||||
ToolActions.PICKAXE_DIG,
|
ToolActions.PICKAXE_DIG,
|
||||||
ToolActions.SHOVEL_DIG,
|
ToolActions.SHOVEL_DIG,
|
||||||
ToolActions.HOE_TILL,
|
ToolActions.HOE_TILL,
|
||||||
ToolActions.SHOVEL_FLATTEN
|
ToolActions.SHOVEL_FLATTEN,
|
||||||
|
ToolActions.AXE_STRIP
|
||||||
);
|
);
|
||||||
|
|
||||||
public AllInOneTool(Tier tier) {
|
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
|
// Player not sneaking? Act as a Hoe to the block, else, Act as a shovel
|
||||||
if (!context.getPlayer().isCrouching()) {
|
if (context.getPlayer().isCrouching()) {
|
||||||
BlockState toolModifiedState = context.getLevel().getBlockState(context.getClickedPos()).getToolModifiedState(context, ToolActions.HOE_TILL, false);
|
return Items.IRON_SHOVEL.useOn(context);
|
||||||
ActuallyAdditions.LOGGER.info("Tool Modified State: " + toolModifiedState);
|
|
||||||
return Items.IRON_HOE.useOn(context);
|
|
||||||
}
|
}
|
||||||
|
InteractionResult tmp = Items.IRON_AXE.useOn(context);
|
||||||
return Items.IRON_SHOVEL.useOn(context);
|
if (tmp != InteractionResult.SUCCESS)
|
||||||
|
return tmp;
|
||||||
|
return Items.IRON_HOE.useOn(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue