function newLevel(){ ModPE.defineBlock(25, "Jukebox", [74, 75, 74, 74, 74, 74], false, 0); // [바닥, 위, 나머지 둘레] } function useItem(x, y, z, item, block, side, itemData, blockData){ var pos = getSide(x, y, z, side); if(item == 25){   setTile(pos[0], pos[1], pos[2], 25, 0);   removeItemInventory(25, 0, 1); } } function destroyBlock(x, y, z, side){ if(getTile(x, y, z) == 25) Level.dropItem(x, y, z, 0, 25, 1, 0); } function getSide(x, y, z, side){ var pos = [];  switch(side){   case 0:    pos = [x, y - 1, z]; // 아래쪽    break;   case 1:    pos = [x, y + 1, z]; // 위쪽    break;   case 2:    pos = [x, y, z - 1]; // 남쪽    break;   case 3:    pos = [x, y, z + 1]; // 북쪽    break;   case 4:    pos = [x - 1, y, z]; // 동쪽    break;   case 5:    pos = [x + 1, y, z]; // 서쪽    break; }  return pos; } function removeItemInventory(id, damage, count){ for(var i = 9; i <= 44; i++){   if(Player.getInventorySlot(i) == id && Player.getInventorySlotData(i) == damage){    var c = (Player.getInventorySlotCount(i) - count);    Player.clearInventorySlot(i);       if(c > 0){         addItemInventory(id, c, damage);         return;    }else if(c < 0){         count = parseInt(c);    }else return;   } } }