game global · type Game
The game version a room runs, its entity kinds, blocks and items, and the pack's own blocks, items and recipes: the game global, or room.game.
Functions 3
game.block(name: string) → Block?Returns one block in this version's numbers, or nil for a name this game has no word for.
game.item(name: string) → Item?Returns an item this game has, or nil for a name it does not; never an error.
game.texture(width: number, height: number) → TextureReturns a new texture of width by height pixels, see-through until drawn on, for a pack's block or item.
Fields 9
game.version: stringThis game's version, such as "a0.1.0".
game.world_height: numberHow tall the world is in blocks: 128, or 256 for a 1.8.9 world.
game.sea_level: numberThe y of this world's sea level.
game.entities: Entities & { [string]: (EntityKind | EntityDef)? }The kinds of entity: define a pack's own, amend the game's own, and read a kind of the game: a mob kind by either spelling (game.entities.cow, game.entities.Cow), a kind that is not a mob by its name (game.entities.arrow); nil where the game has none. It iterates every kind, including pack definitions: for name, kind in game.entities do.
game.blocks: BlocksThe one table that *adds* to a version rather than reading it.
game.biomes: BiomesBiomes of the pack's own: a vanilla biome with other colours and weather.
game.recipes: RecipesWhat a crafting grid and a furnace make of a pack's items; recipes are added while the pack loads.
game.items: ItemsDefines items of the pack's own, with a texture for clients from 1.21.4.
game.terrain: { snow: boolean?, steps: { TerrainStep }? }?What this world's overworld is made of: snow and steps, as citadel.yml writes them; read-only, nil when there is no list.