mirror of
https://codeberg.org/tenplus1/bakedclay.git
synced 2024-09-01 01:00:17 +02:00
Tidied code, now using minecraft recipe to colour blocks
This commit is contained in:
parent
20dc809545
commit
174cda7018
|
@ -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
|
||||
https://forum.minetest.net/viewtopic.php?id=8890
|
||||
|
|
37
init.lua
37
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user