Examples: Shovel

Textures

Item

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

textureFile = "shovel.png";

mod.js

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