if (pinv.getCurrentItem() != null)
{if (pinv.getCurrentItem().itemID == 18) {var ent = pinv.getCurrentItem(); player.swingMainHand();}}
if (pinv.getOffhandItem() != null) 
{if (pinv.getOffhandItem().itemID == 18) {var ent = pinv.getOffhandItem(); player.swingOffHand();}}

if (hitBlock != null) {var blockID = world.getBlockID(hitBlock.x,hitBlock.y,hitBlock.z);
var blockMD = world.getMetadata(hitBlock.x,hitBlock.y,hitBlock.z);

var fireP = 6 + Math.sqrt(cooking_lvl+smithing_lvl); fireUP(fireP);

pinv = player.getInventory(); pinv.consumeItem(18);}