jeweler's hammer is a little less sad
This commit is contained in:
parent
e1ba0a14dc
commit
303c307c5c
2 changed files with 7 additions and 1 deletions
|
@ -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));
|
||||
|
|
|
@ -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()));
|
||||
|
||||
|
|
Loading…
Reference in a new issue