I'm trying to add a custom tool material without editing the original class, but when I try to use it in an item is says that the new material is not resolved or isn't a field. This is what I have:
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
EnumToolMaterial FRAG = EnumHelper.addToolMaterial("FRAG", 3, 59, 8.0F, 3.0F, 10);
fragSword = new ItemFragSword(8003, EnumToolMaterial.FRAG)
.setCreativeTab(CreativeTabs.tabCombat).setTextureName("mymod:fragsword").setUnlocalizedName("fragSword");
}
Thanks for any help. I hope this isn't too noobish.
Edit: I'm having the same problem trying to add items to a custom creative tab. I have the tab working, but items won't recognise it. Eclipse tells me it is "unresolved or not a field", just like the tool material