Now that you have a
ToolMaterial, it is time to use it in a tool.
To add a tool to the mod file, add the following code to the mod file:
public static Item sampickaxe; ToolMaterial samium = EnumHelper.addToolMaterial("samium", 3, 1000, 9.5F, 3.5F, 10);
Additionally, add the following code to the
sampickaxe = new ItemSamPickaxe(samium, "sampickaxe");GameRegistry.registerItem(sampickaxe, "SamPickaxe");
All of this code should be familiar to you at this point. The only thing that stands out is that the
ItemSamPickaxe has the
ToolMaterial as its first parameter. This is required for creating tools because of the file that will be extended ...