Examples: Hoe
Textures
Item
/* myHoe.js */
name = "myHoe";
addToCreative[0] = true;
creativeTab = "tools";
full3d = true;
maxDamage = 200;
onUse[0] = "if (world.getBlockName(position) == 'dirt' || world.getBlockName(position) == 'grass') { world.setBlock(position, 'farmland'); itemstack.damageItem(1); }";
textureFile[0] = "hoe.png";
name = "myHoe";
addToCreative[0] = true;
creativeTab = "tools";
full3d = true;
maxDamage = 200;
onUse[0] = "if (world.getBlockName(position) == 'dirt' || world.getBlockName(position) == 'grass') { world.setBlock(position, 'farmland'); itemstack.damageItem(1); }";
textureFile[0] = "hoe.png";
en_US.lang
item.myHoe0.name=My Hoe
mod.js
mod.addItem("myHoe.js", "normal");