Skip to content

game

Static game data: registry lookups and translations. Live objects are player and world.

Function What it does
game.item(id) Item handle for an item id’s default stack
game.translate(key, ...) Translates a key through the client language; ... fills %s slots
game.has_translation(key) Whether the client language knows the key
game.language() Language code, e.g. "en_us"
print(game.translate("block.minecraft.stone"))  -- "Stone" (or localized)
local apple = game.item("minecraft:golden_apple")
print(apple:name(), apple:food().nutrition)
Navigation

Type to search…

↑↓ navigate↵ selectEsc close