Smaragdant blocks, end tools fixes, fur & leaves blocks sounds fixes,
translations, shaders
This commit is contained in:
parent
941b2ace9f
commit
c381260487
35 changed files with 216 additions and 29 deletions
32
src/main/java/ru/betterend/item/tool/EndAxeItem.java
Normal file
32
src/main/java/ru/betterend/item/tool/EndAxeItem.java
Normal file
|
@ -0,0 +1,32 @@
|
|||
package ru.betterend.item.tool;
|
||||
|
||||
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;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import net.minecraft.tag.Tag;
|
||||
import ru.betterend.patterns.Patterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class EndAxeItem extends AxeItem implements DynamicAttributeTool, Patterned {
|
||||
public EndAxeItem(ToolMaterial material, float attackDamage, float attackSpeed, Settings settings) {
|
||||
super(material, attackDamage, attackSpeed, settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMiningLevel(Tag<Item> tag, BlockState state, ItemStack stack, LivingEntity user) {
|
||||
if (tag.equals(FabricToolTags.AXES)) {
|
||||
return this.getMaterial().getMiningLevel();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelPattern(String name) {
|
||||
return Patterns.createJson(Patterns.ITEM_HANDHELD, name);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue