Skip to content

Tile

getTileID

Returns the foreground item ID of the tile.

lua
tile:getTileID()

getPosX

Returns the X coordinate of the tile.

lua
tile:getPosX()

getPosY

Returns the Y coordinate of the tile.

lua
tile:getPosY()

getTileForeground

Returns the foreground item ID of the tile.

lua
tile:getTileForeground()

getTileBackground

Returns the background item ID of the tile.

lua
tile:getTileBackground()

getTileData

Gets a specific data property from a tile (e.g., TileDataProperties.TILE_DATA_TYPE_SEED_FRUITS_COUNT).

Parameters

  • property
lua
tile:getTileData(property)

setTileData

Sets a specific data property on a tile. Requires world:updateTile to show visually. Renamed from setTileDataInt.

Parameters

  • property
  • value
lua
tile:setTileData(property, value)

getTileItem

Returns the item object associated with the tile's foreground.

lua
tile:getTileItem()

getFlags

Returns the bitflags of a tile.

lua
tile:getFlags()

setFlags

Sets the bitflags of a tile.

Parameters

  • flags
lua
tile:setFlags(flags)

Released under the MIT License.