var itemID = 338; var damage = 0; 
var quantity = prices [itemID] [1]; var price = prices [itemID] [3]; 

if (blockID == 206 && blockMD == 9)
{pinv.consumeItemAmount(338,0,1); player.dropItem(Item(339,1)); crafting_xp += 0.8;
itemSearch = player.getEntitiesWithinRange(0.5); for (var i = 0; i < itemSearch.length; i++) {var ent1 = itemSearch[i]; 
if (ent1.getClassType() == "Item") {ent1 = ent1.setPosition(hitBlock.x + 0.5,hitBlock.y + 0.7,hitBlock.z + 0.5);}}}

if (blockID == 206 && blockMD == 4)
{pinv.consumeItemAmount(338,0,1); player.dropItem(Item(353,4)); crafting_xp += 0.4;
itemSearch = player.getEntitiesWithinRange(0.5); for (var i = 0; i < itemSearch.length; i++) {var ent1 = itemSearch[i]; 
if (ent1.getClassType() == "Item") {ent1 = ent1.setPosition(hitBlock.x + 0.5,hitBlock.y + 0.7,hitBlock.z + 0.5);}}}