|Custom Stuff 1
Information presented below this line is outdated syntax or information used for Custom Stuff 1. It will not work with Custom Stuff 2.
The maxuses attribue is an attribute that is usually only used for the normal item type when making tools. The maxuses attribute determines how much durability an item has. This value can be any whole number greater than zero. Tools will not, however, be damaged automatically even after setting this attribute. To damage the durability of an item, a script needs to be called from an event. Once a tool receives enough damage, it will break automatically just like a vanilla game tool would, even if the tool is damaged past its max durability.
Here is an example of an item that will get damaged when used for mining and when used as a weapon.
name = "Overpowered Pick"; id = 451; type = "normal"; iconfile = "random-file.png"; icontexture = 14; maxuses = 4048; efficiency = 40; //how fast it mines blocks harvestblocks = "all"; //what blocks can be harvested efficienyblocks = "pickaxe,2,3,blockID.SAND"; //what blocks are mined faster repairable = "true"; blockdestroyed = "player.damageItem(player.getCurrentSlot(), 1);"; //damages the tool for 1 damage when mining rightclick = "world.harvestBlock(origin);player.damageItem(player.getCurrentSlot(), 2);"; //damages the tool for 2 damage when right click harvesting hitmob = "player.damageItem(player.getCurrentSlot(), 1);"; //damages the tool for 1 damage when used as a weapon