Rename mobs mod to mcl_mobs
[MineClone/MineClone2.git] / mods / ITEMS / mcl_walls / API.md
blob9efb8ce2c184a803ec4b751d41a2be78b4a1b2bd
1 # API for MineClone 2 walls
3 This API allows you to add more walls (like the cobblestone wall) to MineClone 2.
5 ## `mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, sounds)`
7 Adds a new wall type. This is optimized for stone-based walls, but other materials are theoretically possible, too.
9 The current implementation registers a couple of nodes for the different nodeboxes.
10 All walls connect to solid nodes and all other wall nodes.
12 If `craft_material` is not `nil` it also adds a crafting recipe of the following form:
14     CCC
15     CCC
16     
17     Yields 6 walls
18     C = craft_material (can be group)
20 ### Parameters
21 * `nodename`: Full itemstring of the new wall node (base node only). ***Must not have an underscore!***
22 * `description`: Item description of item (tooltip), visible to user
23 * `craft_material`: Item to be used in the crafting recipe. If `nil`, no crafting recipe will be added
24 * `tiles`: Wall textures table, same syntax as for `minetest.register_node`
25 * `inventory_image`: Inventory image (optional, default is an ugly 3D image)
26 * `groups`: Base group memberships (optional, default is `{pickaxey=1}`)
27 * `sounds`: Sound table (optional, by default default uses stone sounds)
29 The following groups will automatically be added to the nodes (where applicable), you do not need to add them
30 to the `groups` table:
32 * `deco_block=1`
33 * `not_in_creative_inventory=1` (except for the base node which the player can take)
34 * `wall=1`
36 ### Example
38     mcl_walls.register_wall("mymod:granitewall", "Granite Wall", {"mymod_granite.png"}, "mymod_granite_wall_inv.png")