Skip to content

TileAPI

Functions

get

  • Args: (pos<Position>)

pos - position of TileEntity

  • Return: <Tile instance> or false
  • Gets a TileEntity from its position

getByID

  • Args: (id<Integer or Tile>)

id - block id or instance of TileEntity

  • Return: <Tile instance>
  • Gets a TileEntity instance from its id

getAll

  • Args: (level<Level>)

level - Level instance

  • Return: Array of tiles in level

add

  • Args: (level<Level>, class<Constant Integer>, x<Integer>, y<Integer>, z<Integer>, data<Array>)

level - Level instance, class - [[Class ID of Tile]], x - posX, y - posY, z - posZ, data - entity data

  • Return: <Tile instance>
  • Adds new tile to the level.

addSign

  • Args: (level<Level>, x<Integer>, y<Integer>, z<Integer>, lines<Array>)

level - Level instance, x - posX, y - posY, z - posZ, lines - data of sign

spawnToAll

  • Args: (tile<Tile>)
  • Return: None
  • Spawns tile for all players in the world.

spawnAll

  • Args: (player<Player>)
  • Return: None
  • Spawns all tiles to player

remove

  • Args: (id<Integer>)
  • Return: None
  • Removes a tile from world