Hammers fix
This commit is contained in:
parent
f80ed2d1e8
commit
ad1c9d7d7a
4 changed files with 28 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
package ru.betterend.item;
|
||||
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.DynamicAttributeTool;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.AxeItem;
|
||||
|
@ -17,6 +18,9 @@ public class EndAxe extends AxeItem implements DynamicAttributeTool {
|
|||
|
||||
@Override
|
||||
public int getMiningLevel(Tag<Item> tag, BlockState state, ItemStack stack, LivingEntity user) {
|
||||
return this.getMaterial().getMiningLevel();
|
||||
if (tag.equals(FabricToolTags.AXES)) {
|
||||
return this.getMaterial().getMiningLevel();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue