Skip to content
benjamin edited this page Feb 22, 2018 · 3 revisions
This is a detailed documentation of the Level functions

###destroyBlock

function Level.destroyBlock(x, y, z, shouldDrop);
  • Destroys a block as if a player destroyed it.

###dropItem

function Level.dropItem(x, y, z, range, id, count, damage);
  • Drops an item onto the floor.

###explode

function Level.explode(x, y, z, radius);
  • No information available

###getAddress

function Level.getAddress();
  • ???

###getBrightness

function Level.getBrightness(x, y, z);
  • Returns the brightness in a certain area in the world.

###getChestSlot

function Level.getChestSlot(x, y, z, slot);
  • Returns the ID of an item in a chest slot.

###getChestSlotCount

function Level.getChestSlotCount(x, y, z, slot);
  • Returns the count of an item in a chest slot.

###getChestSlotData

function Level.getChestSlotData(x, y, z, slot);
  • Returns the damage of an item in a chest slot.

###getData

function Level.getData(x, y, z);
  • Returns the damage of a block in the world.

###getFurnaceSlot

function Level.getFurnaceSlot(x, y, z, slot);
  • Returns the ID of an item in a furnace.

###getFurnaceSlotCount

function Level.getFurnaceSlotCount(x, y, z, slot);
  • Returns the count of an item in a furnace.

###getFurnaceSlotData

function Level.getFurnaceSlotData(x, y, z, slot);
  • Returns the damage of an item in a furnace.

###getGameMode

function Level.getGameMode();
  • Returns the gamemode for the level, 1 for creative, 0 for survival.

###getSignText

function Level.getSignText(x, y, z, line);
  • No information available

###getTile

function Level.getTile(x, y, z);
  • No information available

###getTime

function Level.getTime();
  • No information available

###getWorldDir

function Level.getWorldDir();
  • No information available

###getWorldName

function Level.getWorldName();
  • No information available

###playSound

function Level.playSound(x, y, z, sound, volume, pitch);
  • No information available

###playSoundEnt

function Level.playSoundEnt(entity, sound, volume, pitch);
  • No information available

###setChestSlot

function Level.setChestSlot(x, y, z, slot, id, damage, count);
  • No information available

###setFurnaceSlot

function Level.setFurnaceSlot(x, y, z, slot, id, damage, count);
  • No information available

###setGameMode

function Level.function(gamemode);
  • No information available

###setNightMode

function Level.setNightMode(isNight);
  • No information available

###setSignText

function Level.setSignText(x, y, z, line, text);
  • No information available

###setSpawn

function Level.setSpawn(x, y, z);
  • No information available

###setTile

function Level.setTile(x, y, z, id, damage);
  • No information available

###setTime

function Level.setTime(time);
  • No information available

###spawnChicken

function Level.spawnChicken(x, y, z, skin);
  • No information available

###spawnCow

function Level.spawnCow(x, y, z, skin);
  • No information available

###spawnMob

function Level.spawnMob(x, y, z, typeId, skin);
  • No information available

Level.destroyBlock(x, y, z, shouldDrop);
Level.dropItem(x, y, z, range, id, count, damage);
Level.explode(x, y, z, radius);
Level.getAddress();
Level.getBrightness(x, y, z);
Level.getChestSlot(x, y, z, slot);
Level.getChestSlotCount(x, y, z, slot);
Level.getChestSlotData(x, y, z, slot);
Level.getData(x, y, z);
Level.getFurnaceSlot(x, y, z, slot);
Level.getFurnaceSlotCount(x, y, z, slot);
Level.getFurnaceSlotData(x, y, z, slot);
Level.getGameMode();
Level.getSignText(x, y, z, line);
Level.getTile(x, y, z);
Level.getTime();
Level.getWorldDir();
Level.getWorldName();
Level.playSound(x, y, z, sound, volume, pitch);
Level.playSoundEnt(entity, sound, volume, pitch);
Level.setChestSlot(x, y, z, slot, id, damage, count);
Level.setFurnaceSlot(x, y, z, slot, id, damage, count);
Level.setGameMode(gamemode);
Level.setNightMode(isNight);
Level.setSignText(x, y, z, line, text);
Level.setSpawn(x, y, z);
Level.setTile(x, y, z, id, damage);
Level.setTime(time);
Level.spawnChicken(x, y, z, skin);
Level.spawnCow(x, y, z, skin);
Level.spawnMob(x, y, z, typeId, skin);

Clone this wiki locally