94 lines
3.5 KiB
Lua
94 lines
3.5 KiB
Lua
---Version: 5.18
|
|
---@meta
|
|
|
|
--- Environment ---
|
|
|
|
---Register a node with its definition.
|
|
---
|
|
---**Note**: you must pass a clean table that hasn't already been used
|
|
---for another registration to this function, as it will be modified.
|
|
---@param name string technical node name ("<mod>:<node>").
|
|
---@param node_definition NodeDefinition table with node definition properties.
|
|
function core.register_node(name, node_definition) end
|
|
|
|
---Register an item with its definition.
|
|
---
|
|
---**Note**: you must pass a clean table that hasn't already been used
|
|
---for another registration to this function, as it will be modified.
|
|
---@param name string technical item name ("<mod>:<item>").
|
|
---@param item_definition ItemDefinition table with item definition properties.
|
|
function core.register_craftitem(name, item_definition) end
|
|
|
|
---Register a tool item with its definition.
|
|
---
|
|
---**Note**: you must pass a clean table that hasn't already been used
|
|
---for another registration to this function, as it will be modified.
|
|
---@param name string technical item name ("<mod>:<item>").
|
|
---@param item_definition ItemDefinition table with item definition properties.
|
|
function core.register_tool(name, item_definition) end
|
|
|
|
---Overrides fields of an item registered with register_node/tool/craftitem.
|
|
---
|
|
---**Note**: Item must already be defined.
|
|
---@param name string
|
|
---@param redefinition ItemDefinition|NodeDefinition
|
|
---@param del_fields string[]
|
|
function core.override_item(name, redefinition, del_fields) end
|
|
|
|
---Unregisters the item from the engine, and deletes the entry with key name
|
|
---from `core.registered_items` and from the associated item table according
|
|
---to its nature (e.g. `core.registered_nodes`)
|
|
---@param name string
|
|
function core.unregister_item(name) end
|
|
|
|
---@param name string
|
|
---@param entity_definition EntityDefinition
|
|
function core.register_entity(name, entity_definition) end
|
|
|
|
---@param abm_definition ABMDefinition
|
|
function core.register_abm(abm_definition) end
|
|
|
|
---@param lbm_definition LBMDefinition
|
|
function core.register_lbm(lbm_definition) end
|
|
|
|
---Also use this to set the 'mapgen aliases' needed in a game for the core mapgens.
|
|
---
|
|
---See [Mapgen aliases](https://api.luanti.org/core-namespace-reference/#mapgen-aliases) section above.
|
|
---
|
|
---Does nothing if an item named alias is already registered.
|
|
---@param alias string
|
|
---@param original_name string
|
|
function core.register_alias(alias, original_name) end
|
|
|
|
---Same as core.register_alias, but an already registered item named alias is unregistered first.
|
|
---@param alias string
|
|
---@param original_name string
|
|
function core.register_alias_force(alias, original_name) end
|
|
|
|
---@param ore_definition OreDefinition
|
|
---@return integer
|
|
function core.register_ore(ore_definition) end
|
|
|
|
---@param biome_definition BiomeDefinition
|
|
---@return integer
|
|
function core.register_biome(biome_definition) end
|
|
|
|
---@param name string
|
|
function core.unregister_biome(name) end
|
|
|
|
---@param decoration_definition DecorationDefinition
|
|
---@return integer
|
|
function core.register_decoration(decoration_definition) end
|
|
|
|
---@param schematic_definition SchematicSpecifier|string
|
|
---@return integer
|
|
function core.register_schematic(schematic_definition) end
|
|
|
|
function core.clear_registered_biomes() end
|
|
|
|
function core.clear_registered_decorations() end
|
|
|
|
function core.clear_registered_ores() end
|
|
|
|
function core.clear_registered_schematics() end
|