Tutorial - Creating an item
In this part we're going to add a platinum ingot.
Create a file in the items directory and name it platinumIngot.js. Add the following lines to it:
name = "platinumIngot";
id = config.getItemId("platinumIngot");
displayName[0] = "Platinum Ingot";
addToCreative[0] = true;
creativeTab = "materials";
maxStack = 64;
textureFile[0] = "platinumIngot.png";
id = config.getItemId("platinumIngot");
displayName[0] = "Platinum Ingot";
addToCreative[0] = true;
creativeTab = "materials";
maxStack = 64;
textureFile[0] = "platinumIngot.png";
Copy the platinumIngot.png into the textures/items directory.
Let's add the item to the mod.js file:
config.addItemIdProperty("platinumIngot", 7000);
mod.addItem("platinumIngot.js", "normal");
mod.addItem("platinumIngot.js", "normal");
That's it. You'll find the ingot in the materials tab in the creative inventory.
Continue with: Adding a smelting recipe