summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rw-r--r--init.lua37
2 files changed, 25 insertions, 17 deletions
diff --git a/README.md b/README.md
index a73a4d5..529285d 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,6 @@
Baked Clay
-This mod for minetest lets the player bake clay into hardened blocks and colour them with dye, stairs and slabs are also available.
+This mod lets the player bake clay into hardened blocks and colour them with
+dye (8x baked clay and 1x dye in centre), stairs and slabs are also available.
-https://forum.minetest.net/viewtopic.php?id=8890 \ No newline at end of file
+https://forum.minetest.net/viewtopic.php?id=8890
diff --git a/init.lua b/init.lua
index 10beff6..87543fc 100644
--- a/init.lua
+++ b/init.lua
@@ -1,5 +1,5 @@
--- Baked Clay (0.4) by TenPlus1
+-- Baked Clay (0.5) by TenPlus1
local clay = {
{"white", "White"},
@@ -19,31 +19,38 @@ local clay = {
{"dark_green", "Dark Green"},
}
-for n = 1, #clay do
+for _, clay in pairs(clay) do
-- node definition
- minetest.register_node("bakedclay:" .. clay[n][1], {
- description = clay[n][2] .. " Baked Clay",
- tiles = {"baked_clay_" .. clay[n][1] ..".png"},
+
+ minetest.register_node("bakedclay:" .. clay[1], {
+ description = clay[2] .. " Baked Clay",
+ tiles = {"baked_clay_" .. clay[1] ..".png"},
groups = {cracky = 3, bakedclay = 1},
sounds = default.node_sound_stone_defaults(),
})
-- craft from dye and any baked clay
+
minetest.register_craft({
- type = "shapeless",
- output = "bakedclay:" .. clay[n][1],
- recipe = {"dye:" .. clay[n][1], "group:bakedclay"},
+ output = "bakedclay:" .. clay[1] .. " 8",
+ recipe = {
+ {"group:bakedclay", "group:bakedclay", "group:bakedclay"},
+ {"group:bakedclay", "dye:" .. clay[1], "group:bakedclay"},
+ {"group:bakedclay", "group:bakedclay", "group:bakedclay"}
+ },
})
- -- register stair and slab
+ -- register stair and slab (unless stairs redo active)
+
if stairs and not stairs.mod then
- stairs.register_stair_and_slab("bakedclay_".. clay[n][1], "bakedclay:".. clay[n][1],
- {cracky = 3},
- {"baked_clay_" .. clay[n][1] .. ".png"},
- clay[n][2] .. " Baked Clay Stair",
- clay[n][2] .. " Baked Clay Slab",
- default.node_sound_stone_defaults())
+
+ stairs.register_stair_and_slab("bakedclay_".. clay[1], "bakedclay:".. clay[1],
+ {cracky = 3},
+ {"baked_clay_" .. clay[1] .. ".png"},
+ clay[2] .. " Baked Clay Stair",
+ clay[2] .. " Baked Clay Slab",
+ default.node_sound_stone_defaults())
end
end