package com.atsuishio.superbwarfare.item;

import com.atsuishio.superbwarfare.init.ModItems;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.SwordItem;
import net.minecraft.world.item.Tier;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.block.Block;
import org.jetbrains.annotations.NotNull;

public class Knife extends SwordItem {

    private static final Tier TIER = new Tier() {
        public int getUses() {
            return 1500;
        }

        public float getSpeed() {
            return 7f;
        }

        public float getAttackDamageBonus() {
            return 2.5f;
        }

        @Override
        public @NotNull TagKey<Block> getIncorrectBlocksForDrops() {
            return BlockTags.INCORRECT_FOR_IRON_TOOL;
        }

        public int getLevel() {
            return 2;
        }

        public int getEnchantmentValue() {
            return 2;
        }

        public @NotNull Ingredient getRepairIngredient() {
            return Ingredient.of(new ItemStack(ModItems.STEEL_INGOT.get()));
        }
    };

    public Knife() {
        super(TIER, new Properties().attributes(SwordItem.createAttributes(TIER, 3, -1.8f)).stacksTo(1));
    }
}
