25 lines
651 B
Java
25 lines
651 B
Java
package net.minecraft.world.item;
|
|
|
|
import java.util.List;
|
|
import net.minecraft.tags.TagKey;
|
|
import net.minecraft.world.item.component.Tool;
|
|
import net.minecraft.world.item.crafting.Ingredient;
|
|
import net.minecraft.world.level.block.Block;
|
|
|
|
public interface Tier {
|
|
int getUses();
|
|
|
|
float getSpeed();
|
|
|
|
float getAttackDamageBonus();
|
|
|
|
TagKey<Block> getIncorrectBlocksForDrops();
|
|
|
|
int getEnchantmentValue();
|
|
|
|
Ingredient getRepairIngredient();
|
|
|
|
default Tool createToolProperties(TagKey<Block> block) {
|
|
return new Tool(List.of(Tool.Rule.deniesDrops(this.getIncorrectBlocksForDrops()), Tool.Rule.minesAndDrops(block, this.getSpeed())), 1.0F, 1);
|
|
}
|
|
}
|