123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- -- Node will be called <modname>slab_<subname>
- function stairsplus.register_slab(modname, subname, recipeitem, groups, images, description, drop, sounds, sunlight)
- groups.slab = 1
- --
- -- nodes
- --
- minetest.register_node(":".. modname .. ":slab_" .. subname, {
- description = description,
- drawtype = "nodebox",
- tiles = images,
- paramtype = "light",
- is_ground_content = false,
- sunlight_propagates = sunlight,
- groups = groups,
- drop = modname .. ":slab_" .. drop,
- node_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- },
- sounds = sounds,
- })
- minetest.register_node(":stairs:slab_" .. subname, {
- description = description,
- drawtype = "nodebox",
- tiles = images,
- paramtype = "light",
- is_ground_content = false,
- sunlight_propagates = sunlight,
- groups = groups,
- drop = ":stairs:slab_" .. drop,
- node_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- },
- sounds = sounds,
- })
- minetest.register_node(":".. modname .. ":slab_" .. subname .. "_inverted", {
- description = description,
- drawtype = "nodebox",
- tiles = images,
- paramtype = "light",
- is_ground_content = false,
- sunlight_propagates = sunlight,
- groups = groups,
- drop = modname .. ":slab_" .. drop .. "_inverted",
- node_box = {
- type = "fixed",
- fixed = {-0.5, 0, -0.5, 0.5, 0.5, 0.5},
- },
- sounds = sounds,
- })
- --
- -- crafting
- --
- minetest.register_craft({
- output = modname .. ":slab_" .. subname .. " 6",
- recipe = {
- {recipeitem, recipeitem, recipeitem},
- },
- })
- minetest.register_craft({
- output = modname .. ":slab_" .. subname .. "_inverted 1",
- recipe = {
- {modname .. ":slab_" .. subname},
- },
- })
- minetest.register_craft({
- output = modname .. ":slab_" .. subname .. " 1",
- recipe = {
- {modname .. ":slab_" .. subname .. "_inverted"},
- },
- })
- minetest.register_craft({
- output = recipeitem,
- recipe = {
- {modname .. ":slab_" .. subname},
- {modname .. ":slab_" .. subname},
- },
- })
- minetest.register_craft({
- output = recipeitem,
- recipe = {
- {modname .. ":slab_" .. subname .. "_inverted"},
- {modname .. ":slab_" .. subname .. "_inverted"},
- },
- })
- minetest.register_craft({
- output = recipeitem,
- recipe = {
- {modname .. ":slab_" .. subname},
- {modname .. ":slab_" .. subname},
- },
- })
- --
- -- cooking
- --
- minetest.register_craft({
- type = "cooking",
- output = ":stairs:slab_stone",
- recipe = ":stairs:slab_cobble",
- })
- minetest.register_craft({
- type = "cooking",
- output = modname .. ":slab_stone_inverted",
- recipe = modname .. ":slab_cobble_inverted",
- })
- end
|