2013-08-27 00:49:32 +02:00
|
|
|
package mekanism.tools.item;
|
2012-08-15 22:41:41 +02:00
|
|
|
|
2012-11-15 21:04:12 +01:00
|
|
|
import java.util.List;
|
|
|
|
|
2013-05-20 00:43:01 +02:00
|
|
|
import mekanism.common.Mekanism;
|
|
|
|
import net.minecraft.client.renderer.texture.IconRegister;
|
2012-12-20 22:53:39 +01:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.item.EnumToolMaterial;
|
|
|
|
import net.minecraft.item.ItemStack;
|
2013-05-20 00:43:01 +02:00
|
|
|
import net.minecraft.item.ItemSword;
|
2012-08-15 22:41:41 +02:00
|
|
|
|
2013-05-20 00:43:01 +02:00
|
|
|
public class ItemMekanismSword extends ItemSword
|
2012-08-15 22:41:41 +02:00
|
|
|
{
|
2014-03-08 02:00:25 +01:00
|
|
|
public ItemMekanismSword(int id, EnumToolMaterial enumtoolmaterial)
|
|
|
|
{
|
|
|
|
super(id, enumtoolmaterial);
|
|
|
|
setCreativeTab(Mekanism.tabMekanism);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2012-11-15 21:04:12 +01:00
|
|
|
public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag)
|
|
|
|
{
|
2014-03-08 02:00:25 +01:00
|
|
|
list.add("HP: " + (itemstack.getMaxDamage() - itemstack.getItemDamage()));
|
2012-11-15 21:04:12 +01:00
|
|
|
}
|
2014-03-08 02:00:25 +01:00
|
|
|
|
2013-05-20 00:43:01 +02:00
|
|
|
@Override
|
|
|
|
public void registerIcons(IconRegister register)
|
|
|
|
{
|
|
|
|
itemIcon = register.registerIcon("mekanism:" + getUnlocalizedName().replace("item.", ""));
|
|
|
|
}
|
2012-08-15 22:41:41 +02:00
|
|
|
}
|