package com.zivilon.cinder_loe.items;

import lotr.common.item.LOTRMaterial;
import lotr.common.item.LOTRItemSword;
import com.zivilon.cinder_loe.LoECreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;

public class LoESword extends LOTRItemSword {
    public Item repair_item;

    public LoESword(LOTRMaterial material) {
        this(material, (Item) null);
    }
    public LoESword(LOTRMaterial material, Block repair_block) {
        this(material, Item.getItemFromBlock(repair_block));
    }
    public LoESword(LOTRMaterial material, Item item) {
        super(material);
        repair_item = item;
        setCreativeTab(LoECreativeTabs.tabCombatLoE);
    }

    public LoESword setWeaponDamage(float damage) {
        this.lotrWeaponDamage = damage;
        return this;
    }

    @Override
    public boolean getIsRepairable(ItemStack item, ItemStack repair_material) {
        if (repair_material.getItem() == repair_item)
            return true;
        return false;
    }
}
