Examples: Hoe
Textures
Item
/* myHoe.js */
id = config.getItemId("myHoeId");
name = "myHoe";
displayName[0] = "My Hoe";
addToCreative[0] = true;
creativeTab = "tools";
full3d = true;
maxDamage = 200;
onUse[0] = "if (world.getBlockId(position) == 2 || world.getBlockId(position) == 3) { world.setBlockId(position, 60); itemstack.damageItem(1); }";
textureFile[0] = "hoe.png";
id = config.getItemId("myHoeId");
name = "myHoe";
displayName[0] = "My Hoe";
addToCreative[0] = true;
creativeTab = "tools";
full3d = true;
maxDamage = 200;
onUse[0] = "if (world.getBlockId(position) == 2 || world.getBlockId(position) == 3) { world.setBlockId(position, 60); itemstack.damageItem(1); }";
textureFile[0] = "hoe.png";
mod.js
config.addItemIdProperty("myHoeId", 6004);
mod.addItem("myHoe.js", "normal");
mod.addItem("myHoe.js", "normal");