Smaragdant blocks, end tools fixes, fur & leaves blocks sounds fixes,

translations, shaders
This commit is contained in:
paulevsGitch 2021-03-27 18:01:19 +03:00
parent 941b2ace9f
commit c381260487
35 changed files with 216 additions and 29 deletions

View file

@ -1,4 +1,4 @@
package ru.betterend.item;
package ru.betterend.item.tool;
import net.fabricmc.fabric.api.tool.attribute.v1.DynamicAttributeTool;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;

View file

@ -1,4 +1,4 @@
package ru.betterend.item;
package ru.betterend.item.tool;
import java.util.UUID;

View file

@ -1,4 +1,4 @@
package ru.betterend.item;
package ru.betterend.item.tool;
import net.minecraft.item.HoeItem;
import net.minecraft.item.ToolMaterial;

View file

@ -1,4 +1,4 @@
package ru.betterend.item;
package ru.betterend.item.tool;
import net.fabricmc.fabric.api.tool.attribute.v1.DynamicAttributeTool;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;

View file

@ -1,7 +1,9 @@
package ru.betterend.item;
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.fabricmc.fabric.impl.tool.attribute.ToolManagerImpl;
import net.fabricmc.fabric.impl.tool.attribute.ToolManagerImpl.Entry;
import net.minecraft.block.BlockState;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.Item;
@ -25,6 +27,12 @@ public class EndShovelItem extends ShovelItem implements DynamicAttributeTool, P
return 0;
}
@Override
public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) {
Entry entry = ToolManagerImpl.entryNullable(state.getBlock());
return (entry != null && entry.getMiningLevel(FabricToolTags.SHOVELS) >= 0) ? this.miningSpeed : super.getMiningSpeedMultiplier(stack, state);
}
@Override
public String getModelPattern(String name) {
return Patterns.createJson(Patterns.ITEM_HANDHELD, name);

View file

@ -1,4 +1,4 @@
package ru.betterend.item;
package ru.betterend.item.tool;
import net.fabricmc.fabric.api.tool.attribute.v1.DynamicAttributeTool;
import net.minecraft.item.SwordItem;