From 303c307c5cea46083d90fc0f94bf690d19d728af Mon Sep 17 00:00:00 2001 From: "yrsegal@gmail.com" Date: Sun, 29 May 2022 22:42:19 -0400 Subject: [PATCH] jeweler's hammer is a little less sad --- .../petrak/hexcasting/common/items/ItemJewelerHammer.java | 6 ++++++ .../main/java/at/petrak/hexcasting/common/lib/HexItems.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/items/ItemJewelerHammer.java b/Common/src/main/java/at/petrak/hexcasting/common/items/ItemJewelerHammer.java index 7412bb8b..a2f57695 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/items/ItemJewelerHammer.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/items/ItemJewelerHammer.java @@ -6,6 +6,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.PickaxeItem; import net.minecraft.world.item.Tier; +import net.minecraft.world.item.Tiers; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; @@ -14,6 +15,11 @@ public class ItemJewelerHammer extends PickaxeItem { super(tier, damageMod, attackSpeedMod, props); } + @Override + public int getEnchantmentValue() { + return Tiers.DIAMOND.getEnchantmentValue(); + } + public static boolean shouldFailToBreak(Player player, BlockState state, BlockPos pos) { ItemStack stack = player.getMainHandItem(); return stack.is(HexItems.JEWELER_HAMMER) && Block.isShapeFullBlock(state.getShape(player.level, pos)); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java index ad816f4e..e6c899ad 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java @@ -55,7 +55,7 @@ public class HexItems { public static final ItemArtifact ARTIFACT = make("artifact", new ItemArtifact(unstackable())); public static final ItemJewelerHammer JEWELER_HAMMER = make("jeweler_hammer", - new ItemJewelerHammer(Tiers.IRON, 0, -2.8F, props().stacksTo(1))); + new ItemJewelerHammer(Tiers.IRON, 0, -2.8F, props().stacksTo(1).defaultDurability(Tiers.DIAMOND.getUses()))); public static final ItemScroll SCROLL = make("scroll", new ItemScroll(props()));