From 7711cddaf112af3232febb3cda6d24785b604888 Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Mon, 28 Feb 2022 23:59:44 -0400 Subject: [PATCH] docs - update docs to the sfans mientest 0.4.18 release * this branch is the respective game for the historical 0.4.18 archived --- README.md | 23 +-- README.txt | 17 +- game_api.md | 64 ++++---- game_api.txt | 410 +++++++++++++++---------------------------------- mods/README.md | 5 +- 5 files changed, 182 insertions(+), 337 deletions(-) diff --git a/README.md b/README.md index f1fc3ab..f6e20bc 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ for minetest v5 and minetest v4 or 0.4. Introduction ------------ -This is the branch `stable-4.0` of minetest game for minetest4 a version -that is focused in v5 of minetest but mainly in 4.0 release. There's +This is the branch `stable-4.1` of minetest game for minetest4 a version +that is focused in v4 of minetest but mainly in 0.4.18/4.0.18 release. There's also a minetest4 game version too in `stable-4.0` branch. This are focused to provide minimal default game featured for minetest4 @@ -22,18 +22,18 @@ For further information, check the [Minetest Wiki](https://wiki.minetest.net/Sub ## Download Can be obtained from https://codeberg.org/minenux/minetest-game-minetest/tags -those like 4.0.X by example https://codeberg.org/minenux/minetest-game-minetest/releases/tag/4.0.17 +those like 4.0.X by example https://codeberg.org/minenux/minetest-game-minetest/releases/tag/4.0.18 It will download a tar.gz file, uncompress the content and a directory will be created, the name of the directory does not matter, the contents will be used later to install. When stable releases are made, Minetest Game and the Minetest engine is packaged and made available at https://codeberg.org/minenux/minetest-engine/archive/stable-4.0.tar.gz -or generally at https://codeberg.org/minenux/minetest-engine/releases/tag/4.0.17 by example. +or generally at https://codeberg.org/minenux/minetest-engine/releases/tag/4.0.18 by example. ## Installation -This game can be used in any version from 5.0 to 4.0, it may work with 5.3 but not with 5.5 +This game can be used in any version from 0.4.18 to 4.0.18 and 5.2, it does nto work with 5.3 or up After download, rename the directory decompressed to `minetest_game` and put to the "games" directory: @@ -50,11 +50,15 @@ For further information or help, see: https://wiki.minetest.net/Installing_Mods * bucket * bones * boats +* butterflies * creative * default +* player_api +* sethome * doors * farming * fire +* fireflies * give_initial_stuff * stairs * carts @@ -68,17 +72,16 @@ For further information or help, see: https://wiki.minetest.net/Installing_Mods * walls * wool -The default mod provides sethome and player_api call ones, binoculars from v5 are -just separate privilegies for zoom, butterflies and fireflies from v5 can be set -by dmobs or mobs_doomed mod, the spawn mod is just minimal spawn management +The binoculars from v5 were removed due lackof features in engine api, and it +just separate privilegies for zoom, the spawn mod is just minimal spawn management pooly provided and better managed by mods like rspawn and spawnrandom. ## Compatibility This source code and files are only compatible with matched minetest4 engine -from https://codeberg.org/minenux/minetest-engine/src/branch/stable-4.0 +from https://codeberg.org/minenux/minetest-engine/src/branch/stable-4.1 Additionally, when the Minetest4 engine is tagged to be a certain version (e.g. -4.0.17), Minetest Game is tagged with the version 4.0.17 too. +4.0.18), Minetest Game is tagged with the version 4.0.18 too. ## Licensing diff --git a/README.txt b/README.txt index 0137046..67b3720 100644 --- a/README.txt +++ b/README.txt @@ -10,8 +10,8 @@ for minetest v5 and minetest v4 or 0.4. Introduction ------------ -This is the branch `stable-4.0` of minetest game for minetest4 a version -that is focused in v5 of minetest but mainly in 4.0 release. There's +This is the branch `stable-4.1` of minetest game for minetest4 a version +that is focused in v4 of minetest but mainly in 0.4.18/4.0.18 release. There's also a minetest4 game version too in `stable-4.0` branch. This are focused to provide minimal default game featured for minetest4 @@ -22,18 +22,18 @@ For further information, check the [Minetest Wiki](https://wiki.minetest.net/Sub ## Download Can be obtained from https://codeberg.org/minenux/minetest-game-minetest/tags -those like 4.0.X by example https://codeberg.org/minenux/minetest-game-minetest/releases/tag/4.0.17 +those like 4.0.X by example https://codeberg.org/minenux/minetest-game-minetest/releases/tag/4.0.18 It will download a tar.gz file, uncompress the content and a directory will be created, the name of the directory does not matter, the contents will be used later to install. When stable releases are made, Minetest Game and the Minetest engine is packaged and made available at https://codeberg.org/minenux/minetest-engine/archive/stable-4.0.tar.gz -or generally at https://codeberg.org/minenux/minetest-engine/releases/tag/4.0.17 by example. +or generally at https://codeberg.org/minenux/minetest-engine/releases/tag/4.0.18 by example. ## Installation -This game can be used in any version from 5.0 to 4.0, it may work with 5.3 but not with 5.5 +This game can be used in any version from 0.4.18 to 4.0.18 and 5.2, it does nto work with 5.3 or up After download, rename the directory decompressed to `minetest_game` and put to the "games" directory: @@ -50,11 +50,13 @@ For further information or help, see: https://wiki.minetest.net/Installing_Mods * bucket * bones * boats +* butterflies * creative * default * doors * farming * fire +* fireflies * give_initial_stuff * stairs * carts @@ -69,14 +71,13 @@ For further information or help, see: https://wiki.minetest.net/Installing_Mods * wool The default mod provides sethome and player_api call ones, binoculars from v5 are -just separate privilegies for zoom, butterflies and fireflies from v5 can be set -by dmobs or mobs_doomed mod, the spawn mod is just minimal spawn management +just separate privilegies for zoom, the spawn mod is just minimal spawn management pooly provided and better managed by mods like rspawn and spawnrandom. ## Compatibility This source code and files are only compatible with matched minetest4 engine -from https://codeberg.org/minenux/minetest-engine/src/branch/stable-4.0 +from https://codeberg.org/minenux/minetest-engine/src/branch/stable-4.1 Additionally, when the Minetest4 engine is tagged to be a certain version (e.g. 4.0.18), Minetest Game is tagged with the version 4.0.18 too. diff --git a/game_api.md b/game_api.md index aa5dc66..6497b73 100644 --- a/game_api.md +++ b/game_api.md @@ -646,42 +646,44 @@ Default constants Player API ---------- -The player API can register player models and update the player's appearence +The player API can register player models and update the player's appearance. -`default.player_register_model(name, def)` +* `player_api.register_model(name, def)` + * Register a new model to be used by players + * name: model filename such as "character.x", "foo.b3d", etc. + * def: See [#Model definition] + * saved to player_api.registered_models - * Register a new model to be used by players. - * name: model filename such as "character.x", "foo.b3d", etc. - * def: See [#Model definition] +* `player_api.registered_player_models[name]` + * Get a model's definition + * see [#Model definition] -`default.registered_player_models[name]` +* `player_api.set_model(player, model_name)` + * Change a player's model + * `player`: PlayerRef + * `model_name`: model registered with player_api.register_model() - * Get a model's definition - * see [#Model definition] +* `player_api.set_animation(player, anim_name [, speed])` + * Applies an animation to a player + * anim_name: name of the animation. + * speed: frames per second. If nil, default from the model is used -`default.player_set_model(player, model_name)` +* `player_api.set_textures(player, textures)` + * Sets player textures + * `player`: PlayerRef + * `textures`: array of textures, If `textures` is nil the default + textures from the model def are used - * Change a player's model - * `player`: PlayerRef - * `model_name`: model registered with player_register_model() +* `player_api.get_animation(player)` + * Returns a table containing fields `model`, `textures` and `animation`. + * Any of the fields of the returned table may be nil. + * player: PlayerRef -`default.player_set_animation(player, anim_name [, speed])` - - * Applies an animation to a player - * anim_name: name of the animation. - * speed: frames per second. If nil, default from the model is used - -`default.player_set_textures(player, textures)` - - * Sets player textures - * `player`: PlayerRef - * `textures`: array of textures, If `textures` is nil, the default textures from the model def are used - -default.player_get_animation(player) - - * Returns a table containing fields `model`, `textures` and `animation`. - * Any of the fields of the returned table may be nil. - * player: PlayerRef +* `player_api.player_attached` + * A table that maps a player name to a boolean. + * If the value for a given player is set to true, the default player + animations (walking, digging, ...) will no longer be updated. + Knockback from damage is also prevented for that player. ### Model Definition @@ -693,8 +695,10 @@ default.player_get_animation(player) -- = {x = , y = }, foo = {x = 0, y = 19}, bar = {x = 20, y = 39}, - -- ... + -- ... }, + collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}, -- In nodes from feet position + stepheight = 0.6, -- In nodes eye_height = 1.47, -- In nodes above feet position } diff --git a/game_api.txt b/game_api.txt index 4a39e5e..6497b73 100644 --- a/game_api.txt +++ b/game_api.txt @@ -1,7 +1,8 @@ Minetest Game API ================= -GitHub Repo: https://github.com/minetest/minetest_game +This is a fork of the original one at https://github.com/minetest/minetest_game +For more information about fork check [Differences](#differences) section. Introduction ------------ @@ -62,6 +63,7 @@ Please note: - [Carts](#carts) - [Key API](#key-api) + Bucket API ---------- @@ -82,7 +84,6 @@ The bucket API allows registering new types of buckets for non-default liquids. The filled bucket item is returned to the player that uses an empty bucket pointing to the given liquid source. When punching with an empty bucket pointing to an entity or a non-liquid node, the on_punch of the entity or node will be triggered. - Beds API -------- @@ -91,7 +92,6 @@ Beds API def -- See [#Bed definition] ) - * `beds.can_dig(bed_pos)` Returns a boolean whether the bed at `bed_pos` may be dug * `beds.read_spawns() ` Returns a table containing players respawn positions * `beds.kick_players()` Forces all players to leave bed * `beds.skip_night()` Sets world time to morning and saves respawn position of all players currently sleeping @@ -117,17 +117,6 @@ Beds API } } - -Bones API ---------- - -An ordered list of listnames (default: "main", "craft") of the player inventory, -that will be placed into bones or dropped on player death can be looked up or changed -in `bones.player_inventory_lists`. - -e.g. `table.insert(bones.player_inventory_lists, "backpack")` - - Creative API ------------ @@ -149,69 +138,11 @@ The contents of `creative.formspec_add` is appended to every creative inventory page. Mods can use it to add additional formspec elements onto the default creative inventory formspec to be drawn after each update. - -Chests API ----------- - -The chests API allows the creation of chests, which have their own inventories for holding items. - -`default.chest.get_chest_formspec(pos)` - - * Returns a formspec for a specific chest. - * `pos` Location of the chest node, e.g `{x = 1, y = 1, z = 1}` - -`default.chest.chest_lid_obstructed(pos)` - - * Returns a boolean depending on whether or not a chest has its top obstructed by a solid node. - * `pos` Location of the chest node, e.g `{x = 1, y = 1, z = 1}` - -`default.chest.chest_lid_close(pn)` - - * Closes the chest that a player is currently looking in. - * `pn` The name of the player whose chest is going to be closed - -`default.chest.open_chests` - - * A table indexed by player name to keep track of who opened what chest. - * Key: The name of the player. - * Value: A table containing information about the chest the player is looking at. - e.g `{ pos = {1, 1, 1}, sound = null, swap = "chest" }` - -`default.chest.register_chest(name, def)` - - * Registers new chest - * `name` Name for chest - * `def` See [#Chest Definition] - -### Chest Definition - - description = "Chest", - tiles = { - "default_chest_top.png", - "default_chest_top.png", - "default_chest_side.png", - "default_chest_side.png", - "default_chest_front.png", - "default_chest_inside.png" - }, -- Textures which are applied to the chest model. - sounds = default.node_sound_wood_defaults(), - sound_open = "default_chest_open", - sound_close = "default_chest_close", - groups = {choppy = 2, oddly_breakable_by_hand = 2}, - protected = false, -- If true, only placer can modify chest. - - Doors API --------- The doors mod allows modders to register custom doors and trapdoors. -`doors.registered_doors[name] = Door definition` - * Table of registered doors, indexed by door name - -`doors.registered_trapdoors[name] = Trapdoor definition` - * Table of registered trap doors, indexed by trap door name - `doors.register_door(name, def)` * Registers new door @@ -247,13 +178,6 @@ The doors mod allows modders to register custom doors and trapdoors. has the permissions needed to open this door. If omitted then no permission checks are performed. -`doors.door_toggle(pos, node, clicker)` - - * Toggle door open or shut - * `pos` Position of the door - * `node` Node definition - * `clicker` Player definition for the player that clicked on the door - ### Door definition description = "Door description", @@ -265,8 +189,6 @@ The doors mod allows modders to register custom doors and trapdoors. sound_open = sound play for open door, -- optional sound_close = sound play for close door, -- optional protected = false, -- If true, only placer can open the door (locked for others) - on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - -- optional function containing the on_rightclick callback, defaults to a doors.door_toggle-wrapper ### Trapdoor definition @@ -279,10 +201,6 @@ The doors mod allows modders to register custom doors and trapdoors. sound_open = sound play for open door, -- optional sound_close = sound play for close door, -- optional protected = false, -- If true, only placer can open the door (locked for others) - on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - -- function containing the on_rightclick callback - on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - -- function containing the on_rightclick callback ### Fence gate definition @@ -292,42 +210,6 @@ The doors mod allows modders to register custom doors and trapdoors. material = "default:wood", groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, sounds = default.node_sound_wood_defaults(), -- optional - on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - -- function containing the on_rightclick callback - - -Dungeon Loot API ----------------- - -The mod that places chests with loot in dungeons provides an API to register additional loot. - -`dungeon_loot.register(def)` - - * Registers one or more loot items - * `def` Can be a single [#Loot definition] or a list of them - -`dungeon_loot.registered_loot` - - * Table of all registered loot, not to be modified manually - -### Loot definition - - name = "item:name", - chance = 0.5, - -- ^ chance value from 0.0 to 1.0 that the item will appear in the chest when chosen - -- due to an extra step in the selection process, 0.5 does not(!) mean that - -- on average every second chest will have this item - count = {1, 4}, - -- ^ table with minimum and maximum amounts of this item - -- optional, defaults to always single item - y = {-32768, -512}, - -- ^ table with minimum and maximum heights this item can be found at - -- optional, defaults to no height restrictions - types = {"desert"}, - -- ^ table with types of dungeons this item can be found in - -- supported types: "normal" (the cobble/mossycobble one), "sandstone", "desert" - -- optional, defaults to no type restrictions - Fence API --------- @@ -350,7 +232,6 @@ Allows creation of new fences with "fencelike" drawtype. groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, sounds = default.node_sound_wood_defaults(), - Walls API --------- @@ -363,7 +244,6 @@ walls.register(name, desc, texture, mat, sounds) ^ mat = "default:stone". Used to auto-generate crafting recipe. ^ sounds = sounds: see [#Default sounds] - Farming API ----------- @@ -404,7 +284,6 @@ The farming API allows you to easily register plants and hoes. maxlight = default.LIGHT_MAX -- Maximum light to grow } - Fire API -------- @@ -455,62 +334,8 @@ Give Initial Stuff API ^ Adds items to the list of items to be given -Players API ------------ - -The player API can register player models and update the player's appearence - -* `player_api.register_model(name, def)` - * Register a new model to be used by players - * name: model filename such as "character.x", "foo.b3d", etc. - * def: See [#Model definition] - * saved to player_api.registered_models - -* `player_api.registered_player_models[name]` - * Get a model's definition - * see [#Model definition] - -* `player_api.set_model(player, model_name)` - * Change a player's model - * `player`: PlayerRef - * `model_name`: model registered with player_api.register_model() - -* `player_api.set_animation(player, anim_name [, speed])` - * Applies an animation to a player - * anim_name: name of the animation. - * speed: frames per second. If nil, default from the model is used - -* `player_api.set_textures(player, textures)` - * Sets player textures - * `player`: PlayerRef - * `textures`: array of textures, If `textures` is nil the default - textures from the model def are used - -* `player_api.get_animation(player)` - * Returns a table containing fields `model`, `textures` and `animation`. - * Any of the fields of the returned table may be nil. - * player: PlayerRef - -### Model Definition - - { - animation_speed = 30, -- Default animation speed, in FPS. - textures = {"character.png", }, -- Default array of textures. - visual_size = {x = 1, y = 1}, -- Used to scale the model. - animations = { - -- = {x = , y = }, - foo = {x = 0, y = 19}, - bar = {x = 20, y = 39}, - -- ... - }, - collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}, -- In nodes from feet position - stepheight = 0.6, -- In nodes - eye_height = 1.47, -- In nodes above feet position - } - - TNT API -------- +---------- `tnt.register_tnt(definition)` @@ -520,7 +345,6 @@ TNT API * `description` A description for your TNT. * `radius` The radius within which the TNT can destroy nodes. The default is 3. * `damage_radius` The radius within which the TNT can damage players and mobs. By default it is twice the `radius`. - * `sound` The sound played when explosion occurs. By default it is `tnt_explode`. * `disable_drops` Disable drops. By default it is set to false. * `ignore_protection` Don't check `minetest.is_protected` before removing a node. * `ignore_on_blast` Don't call `on_blast` even if a node has one. @@ -528,7 +352,7 @@ TNT API * `side` Side tiles. By default the name of the tnt with a suffix of `_side.png`. * `top` Top tile. By default the name of the tnt with a suffix of `_top.png`. * `bottom` Bottom tile. By default the name of the tnt with a suffix of `_bottom.png`. - * `burning` Top tile when lit. By default the name of the tnt with a suffix of `_top_burning_animated.png". + * `burning` Top tile when lit. By default the name of the tnt with a suffix of `_top_burning_animated.png`. `tnt.boom(position[, definition])` @@ -628,15 +452,11 @@ set a players home position and teleport a player to home position. Sfinv API --------- -It is recommended that you read this link for a good introduction to the -sfinv API by its author: https://rubenwardy.com/minetest_modding_book/en/chapters/sfinv.html - ### sfinv Methods **Pages** * sfinv.set_page(player, pagename) - changes the page -* sfinv.get_page(player) - get the current page name. Will never return nil * sfinv.get_homepage_name(player) - get the page name of the first page to show to a player * sfinv.register_page(name, def) - register a page, see section below * sfinv.override_page(name, def) - overrides fields of an page registered with register_page. @@ -733,65 +553,39 @@ And override this function to change the layout: return table.concat(tmp, "") end - Stairs API ---------- The stairs API lets you register stairs and slabs and ensures that they are registered the same way as those delivered with Minetest Game, to keep them compatible with other mods. -`stairs.register_stair(subname, recipeitem, groups, images, description, sounds, worldaligntex)` +`stairs.register_stair(subname, recipeitem, groups, images, description, sounds)` - * Registers a stair + * Registers a stair. * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname" * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` - * `groups`: See [Known damage and digging time defining groups] - * `images`: See [Tile definition] - * `description`: Used for the description field in the stair's definition - * `sounds`: See [#Default sounds] - * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + * `groups`: see [Known damage and digging time defining groups] + * `images`: see [Tile definition] + * `description`: used for the description field in the stair's definition + * `sounds`: see [#Default sounds] -`stairs.register_slab(subname, recipeitem, groups, images, description, sounds, worldaligntex)` +`stairs.register_slab(subname, recipeitem, groups, images, description, sounds)` - * Registers a slab - * `subname`: Basically the material name (e.g. cobble) used for the slab name. Nodename pattern: "stairs:slab_subname" + * Registers a slabs + * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname" * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble" - * `groups`: See [Known damage and digging time defining groups] - * `images`: See [Tile definition] - * `description`: Used for the description field in the slab's definition - * `sounds`: See [#Default sounds] - * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + * `groups`: see [Known damage and digging time defining groups] + * `images`: see [Tile definition] + * `description`: used for the description field in the stair's definition + * `sounds`: see [#Default sounds] -`stairs.register_stair_inner(subname, recipeitem, groups, images, description, sounds, worldaligntex)` +`stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds)` - * Registers an inner corner stair - * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_inner_subname" - * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` - * `groups`: See [Known damage and digging time defining groups] - * `images`: See [Tile definition] - * `description`: Used for the description field in the stair's definition - * `sounds`: See [#Default sounds] - * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] - -`stairs.register_stair_outer(subname, recipeitem, groups, images, description, sounds, worldaligntex)` - - * Registers an outer corner stair - * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_outer_subname" - * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` - * `groups`: See [Known damage and digging time defining groups] - * `images`: See [Tile definition] - * `description`: Used for the description field in the stair's definition - * `sounds`: See [#Default sounds] - * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] - -`stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds, worldaligntex)` - - * A wrapper for stairs.register_stair, stairs.register_slab, stairs.register_stair_inner, stairs.register_stair_outer + * A wrapper for stairs.register_stair and stairs.register_slab * Uses almost the same arguments as stairs.register_stair - * `desc_stair`: Description for stair nodes. For corner stairs 'Inner' or 'Outer' will be prefixed + * `desc_stair`: Description for stair node * `desc_slab`: Description for slab node - Xpanes API ---------- @@ -809,10 +603,8 @@ Creates panes that automatically connect to each other groups = {group = rating}, -- Uses the known node groups, see [Known damage and digging time defining groups] sounds = SoundSpec, -- See [#Default sounds] recipe = {{"","","","","","","","",""}}, -- Recipe field only - use_texture_alpha = true, -- Optional boolean (default: `false`) for colored glass panes } - Raillike definitions -------------------- @@ -846,48 +638,69 @@ Sounds inside the default table can be used within the sounds field of node defi * `default.node_sound_glass_defaults()` * `default.node_sound_metal_defaults()` - Default constants ----------------- `default.LIGHT_MAX` The maximum light level (see [Node definition] light_source) +Player API +---------- -GUI and formspecs ------------------ +The player API can register player models and update the player's appearance. -`default.get_hotbar_bg(x, y)` +* `player_api.register_model(name, def)` + * Register a new model to be used by players + * name: model filename such as "character.x", "foo.b3d", etc. + * def: See [#Model definition] + * saved to player_api.registered_models - * Get the hotbar background as string, containing the formspec elements - * x: Horizontal position in the formspec - * y: Vertical position in the formspec +* `player_api.registered_player_models[name]` + * Get a model's definition + * see [#Model definition] -`default.gui_bg` +* `player_api.set_model(player, model_name)` + * Change a player's model + * `player`: PlayerRef + * `model_name`: model registered with player_api.register_model() - * Deprecated, remove from mods. +* `player_api.set_animation(player, anim_name [, speed])` + * Applies an animation to a player + * anim_name: name of the animation. + * speed: frames per second. If nil, default from the model is used -`default.gui_bg_img` +* `player_api.set_textures(player, textures)` + * Sets player textures + * `player`: PlayerRef + * `textures`: array of textures, If `textures` is nil the default + textures from the model def are used - * Deprecated, remove from mods. +* `player_api.get_animation(player)` + * Returns a table containing fields `model`, `textures` and `animation`. + * Any of the fields of the returned table may be nil. + * player: PlayerRef -`default.gui_slots` +* `player_api.player_attached` + * A table that maps a player name to a boolean. + * If the value for a given player is set to true, the default player + animations (walking, digging, ...) will no longer be updated. + Knockback from damage is also prevented for that player. - * Deprecated, remove from mods. - -`default.gui_survival_form` - - * Entire formspec for the survival inventory - -`default.get_furnace_active_formspec(fuel_percent, item_percent)` - - * Get the active furnace formspec using the defined GUI elements - * fuel_percent: Percent of how much the fuel is used - * item_percent: Percent of how much the item is cooked - -`default.get_furnace_inactive_formspec()` - - * Get the inactive furnace formspec using the defined GUI elements +### Model Definition + { + animation_speed = 30, -- Default animation speed, in FPS. + textures = {"character.png", }, -- Default array of textures. + visual_size = {x = 1, y = 1}, -- Used to scale the model. + animations = { + -- = {x = , y = }, + foo = {x = 0, y = 19}, + bar = {x = 20, y = 39}, + -- ... + }, + collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}, -- In nodes from feet position + stepheight = 0.6, -- In nodes + eye_height = 1.47, -- In nodes above feet position + } Leafdecay --------- @@ -926,39 +739,70 @@ callback overridden. All the nodes listed in `leaves` have their Dyes ---- -Minetest Game dyes are registered with: +To make recipes that will work with any dye ever made by anybody, define +them based on groups. You can select any group of groups, based on your need for +amount of colors. - groups = {dye = 1, color_ = 1}, +### Color groups -To make recipes that will work with dyes from many mods, define them using the -dye group and the color groups. +Base color groups: -Dye color groups: + * `basecolor_white` + * `basecolor_grey` + * `basecolor_black` + * `basecolor_red` + * `basecolor_yellow` + * `basecolor_green` + * `basecolor_cyan` + * `basecolor_blue` + * `basecolor_magenta` - * `color_white` - * `color_grey` - * `color_dark_grey` - * `color_black` - * `color_red` - * `color_pink` - * `color_orange` - * `color_brown` - * `color_yellow` - * `color_green` - * `color_dark_green` - * `color_blue` - * `color_cyan` - * `color_violet` - * `color_magenta` +Extended color groups ( * means also base color ) -Example of one shapeless recipe using the dye group and a color group: + * `excolor_white` * + * `excolor_lightgrey` + * `excolor_grey` * + * `excolor_darkgrey` + * `excolor_black` * + * `excolor_red` * + * `excolor_orange` + * `excolor_yellow` * + * `excolor_lime` + * `excolor_green` * + * `excolor_aqua` + * `excolor_cyan` * + * `excolor_sky_blue` + * `excolor_blue` * + * `excolor_violet` + * `excolor_magenta` * + * `excolor_red_violet` + +The whole unifieddyes palette as groups: + + * `unicolor_` + +For the following, no white/grey/black is allowed: + + * `unicolor_medium_` + * `unicolor_dark_` + * `unicolor_light_` + * `unicolor__s50` + * `unicolor_medium__s50` + * `unicolor_dark__s50` + +Example of one shapeless recipe using a color group: minetest.register_craft({ type = "shapeless", - output = ":item_yellow", - recipe = {":item_no_color", "group:dye,color_yellow"}, + output = ':item_yellow', + recipe = {':item_no_color', 'group:basecolor_yellow'}, }) +### Color lists + + * `dye.basecolors` are an array containing the names of available base colors + + * `dye.excolors` are an array containing the names of the available extended colors Trees ----- @@ -996,13 +840,6 @@ Trees * `default.grow_acacia_bush(pos)` * Grows an acaia bush at pos - * `default.grow_pine_bush(pos)` - * Grows a pine bush at pos - - * `default.grow_blueberry_bush(pos)` - * Grows a blueberry bush at pos - - Carts ----- @@ -1025,7 +862,6 @@ Carts likely be called many times per second, so the function needs to make sure that the event is handled properly. - Key API ------- diff --git a/mods/README.md b/mods/README.md index 4633239..dc355d7 100644 --- a/mods/README.md +++ b/mods/README.md @@ -10,11 +10,13 @@ For information check [../README.md](../README.md) * bucket * bones * boats +* butterflies * creative * default * doors * farming * fire +* fireflies * give_initial_stuff * stairs * carts @@ -29,8 +31,7 @@ For information check [../README.md](../README.md) * wool The default mod provides sethome and player_api call ones, binoculars from v5 are -just separate privilegies for zoom, butterflies and fireflies from v5 can be set -by dmobs or mobs_doomed mod, the spawn mod is just minimal spawn management +just separate privilegies for zoom, the spawn mod is just minimal spawn management pooly provided and better managed by mods like rspawn and spawnrandom. ## Compatibility