Does it have something to do with my Forge version?
I decided to change my code around to see if it worked, nope.
I gave up, and tried using your "exact" code changing just the names and removing unnecessary methods from interfaces, etc., no luck.
Just. lol, I'm confuzzled.
I'll show my code, just in case I'm doing something wrong:
Main Class - cut down to what is necessary
public static Item sword_GAIN;
static ToolMaterial GAIN = EnumHelper.addToolMaterial("GAIN", 3, -1, 1.0F, 3, 9);
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
sword_GAIN = new GainSword(GAIN, 50D).setUnlocalizedName("gainSword");
}
SwordGain class - I didn't put my imports nor package in this code
//removed package / imports
public class SwordGain extends ItemSword
{
private float weaponDamage;
private final ToolMaterial toolMaterial;
public SwordGain(ToolMaterial material, float damage)
{
super(material);
maxStackSize = 1;
setNoRepair();
this.weaponDamage = damage;
this.setCreativeTab(SMain.smTab);
}
@Override
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) {
return bFull3D;
}
@Override
public String getUnlocalizedName(ItemStack par1ItemStack)
{
int i = MathHelper.clamp_int(par1ItemStack.getItemDamage(), 0, 15);
return super.getUnlocalizedName();
}
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister par1IconRegister)
{
this.itemIcon = par1IconRegister.registerIcon(SMain.modid + ":" + (this.getUnlocalizedName().substring(5)));
}
public float getStrVsBlock(ItemStack itemstack, Block block)
{
return block != Blocks.stone ? 1.5F : 5F;
}
public boolean onBlockDestroyed(ItemStack itemstack, int i, int j, int k, int l, EntityLiving entityliving)
{
return true;
}
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
if (!par2World.isRemote)
{
par3EntityPlayer.addChatMessage(new ChatComponentText("need to add something here ><");
}
return par1ItemStack;
}
public boolean isFull3D()
{
return true;
}
public EnumAction getItemUseAction(ItemStack itemstack)
{
return EnumAction.block;
}
public int getMaxItemUseDuration(ItemStack itemstack)
{
return 0x11940;
}
public boolean canHarvestBlock(Block block)
{
return false;
}
public int getItemEnchantability()
{
return material.getEnchantability();
}
@Override
public Multimap getItemAttributeModifiers()
{
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", (double) this.weaponDamage, 0));
return multimap;
}
}