Examples: Shovel

Textures

Item

/* myShovel.js */
id = config.getItemId("myShovelId");
name = "myShovel";
displayName[0] = "My Shovel";
addToCreative[0] = true;
creativeTab = "tools";
damage[0] = 2;
full3d = true;
toolClass = "shovel";
efficiency[0] = 6.0;
maxDamage = 200;
onHitEntity[0] = "itemstack.damageItem(2);";
onBlockDestroyed[0] = "itemstack.damageItem(1);";

textureFile[0] = "shovel.png";

mod.js

config.addItemIdProperty("myShovelId", 6001);
mod.addItem("myShovel.js", "normal");