Skip to content

Tile

getPosX

Returns the X coordinate of the tile.

lua
getPosX()

getPosY

Returns the Y coordinate of the tile.

lua
getPosY()

getTileBackground

Returns the background item ID of the tile.

lua
getTileBackground()

getTileData

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

lua
tile:getTileData(property)

getTileForeground

Returns the foreground item ID of the tile.

lua
getTileForeground()

getTileID

Returns the foreground item ID of the tile.

lua
getTileID()

getTileItem

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

lua
getTileItem()

setTileData

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

lua
tile:setTileData(property, value)

Released under the MIT License.