Here is my custom sword class:
import com.terraweapons.main.TerraWeapons;
import net.minecraft.item.ItemSword;
public class TerraSword extends ItemSword {
public TerraSword(String name, ToolMaterial material) {
super(material);
this.setUnlocalizedName(name);
this.setCreativeTab(TerraWeapons.tabTerraWeapons);
}
}
Here is my ToolMaterial code:
public static ToolMaterial material1 = EnumHelper.addToolMaterial("material1", 3, 100, 2.0F, 0F, 20);
And here I register my weapons:
public static Item weapon1 = new TerraSword("weapon1", ToolMaterials.material1);