Examples: Sword

Textures

Item

/* mySword.js */
name = "mySword";
addToCreative[0] = true;
creativeTab = "combat";
damage = 10;
full3d = true;
effectiveBlocks = "minecraft:web";
harvestBlocks = "minecraft:web";
efficiency[0] = 6.0;
maxDamage = 200;
maxUsingDuration[0] = 72000;
usingAction[0] = "block";
onHitEntity[0] = "itemstack.damageItem(1);";
onRightClick[0] = "player.setItemInUse();";
onBlockDestroyed[0] = "itemstack.damageItem(2);";

textureFile[0] = "sword.png";

en_US.lang

item.mySword0.name=My Sword

mod.js

mod.addItem("mySword.js", "normal");