var itemID = 2099; var damage = 0;

if (timing > 4) {time.sleep(0.05);
var meta = false; var main = player.getInventory().getCurrentItem();
var offhand = player.getInventory().getOffhandItem();
var setID = 50; var setMD = 0; var falling = false;
var vec = player.getLookVec(); var pos = player.getPosition();
var lastAirPos = [pos.x, pos.y, pos.z]; var check = lastAirPos; sCond = 0;
function whenPlaced () {sound.playSound3D("sound.stoneBuild", lastAirPos[0], lastAirPos[1], lastAirPos[2]);
for (i = 0; torchArray [i] != undefined && torchArray [i] [0] == true; i++) {} 
torchArray [i] = [true, [lastAirPos[0], lastAirPos[1], lastAirPos[2]], 
gameTiming + (lastItemUsed.maxDamage - lastItemUsed.damage)*10, gameTiming - (lastItemUsed.damage)*10];} 
placeBlock(itemID, damage, setID, setMD, falling, maxdist, meta, vec, pos, lastAirPos, main, offhand, check);}