mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-29 14:01:07 +01:00
b237c4642d
I left it in from another branch, didn't want to force push. This reverts commit 58d2f59192073acf9f55406358bf48244e008b9b. Revert "Walls use `source` parameter for default hardness and blast resistance" I left it in from another branch, didn't want to force push. This reverts commit e8944cc145dc59db53a9368d8ae269edf366e742. Revert "Fix prismarine bricks and dark variant blast res." I left it in from another branch, didn't want to force push. This reverts commit 6125d625bc6ce15644cf8b579599f75da5bffd07. Revert "Un-hardcode blast resistance, hardness for walls," I left it in from another branch, didn't want to force push. This reverts commit 26e873703151bc4bfaf7588ad1e3afa731a05fbd. Revert "All wood-type and nether-type fences now match material's blast resistance" I left it in from another branch, didn't want to force push. This reverts commit a1e20f29162462120fb1c046c2d34f8fcebfb413.
1.6 KiB
1.6 KiB
API for VoxeLibre walls
This API allows you to add more walls (like the cobblestone wall) to VoxeLibre.
mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, sounds)
Adds a new wall type. This is optimized for stone-based walls, but other materials are theoretically possible, too.
The current implementation registers a couple of nodes for the different nodeboxes. All walls connect to solid nodes and all other wall nodes.
If craft_material
is not nil
it also adds a crafting recipe of the following form:
CCC
CCC
Yields 6 walls
C = craft_material (can be group)
Parameters
nodename
: Full itemstring of the new wall node (base node only). Must not have an underscore!description
: Item description of item (tooltip), visible to usersource
: Node on which the wall is based off, use for texture and crafting recipe (optional)tiles
: Wall textures table, same syntax as forminetest.register_node
(optional ifsource
is set)inventory_image
: Inventory image (optional ifsource
is set)groups
: Base group memberships (optional, default is{pickaxey=1}
)sounds
: Sound table (optional, by default default uses stone sounds)
The following groups will automatically be added to the nodes (where applicable), you do not need to add them
to the groups
table:
deco_block=1
not_in_creative_inventory=1
(except for the base node which the player can take)wall=1
Example
mcl_walls.register_wall("mymod:granitewall", "Granite Wall", {"mymod_granite.png"}, "mymod_granite_wall_inv.png")