TechReborn/src/main/java/techreborn/items/tools/ItemSteelChainsaw.java

40 lines
1.3 KiB
Java

package techreborn.items.tools;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.common.powerSystem.PoweredItem;
import techreborn.config.ConfigTechReborn;
import techreborn.init.ModItems;
public class ItemSteelChainsaw extends ItemChainsaw {
public ItemSteelChainsaw() {
super(ToolMaterial.IRON, "techreborn.ironChainsaw", ConfigTechReborn.IronChainsawCharge,
ConfigTechReborn.IronChainsawTier, 2.0F);
this.cost = 50;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
public void getSubItems(Item item,
CreativeTabs par2CreativeTabs, NonNullList itemList) {
ItemStack stack = new ItemStack(ModItems.ironChainsaw);
ItemStack uncharged = stack.copy();
ItemStack charged = stack.copy();
PoweredItem.setEnergy(getMaxPower(charged), charged);
itemList.add(uncharged);
itemList.add(charged);
}
@Override
public boolean canHarvestBlock(IBlockState state) {
return Items.IRON_AXE.canHarvestBlock(state);
}
}