mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-10-30 06:10:51 +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,14 +57,14 @@ 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);
|
|
||||||
ActuallyAdditions.LOGGER.info("Tool Modified State: " + toolModifiedState);
|
|
||||||
return Items.IRON_HOE.useOn(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
@Override
|
||||||
public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) {
|
public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) {
|
||||||
|
|
Loading…
Reference in a new issue