Compare commits

13 Commits

Author SHA1 Message Date
762100db46 Merge remote-tracking branch 'upstream/master' 2021-07-05 22:07:21 +02:00
tenplus1
f3e0b60827 remove purge test 2021-07-05 13:08:01 +01:00
tenplus1
a3c96afbda tweak and tidy code, add lucky block 2021-07-05 10:20:29 +01:00
tenplus1
4fdbff14f8 add glazed terracotta 2021-07-03 14:58:36 +01:00
7fc5410778 Merge remote-tracking branch 'upstream/master' 2021-01-23 12:51:30 +01:00
tenplus1
3824e097ba update mod.conf info 2021-01-21 09:50:39 +00:00
e8e1a446b7 Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev 2020-06-16 21:04:13 +02:00
tenplus1
dd7749131c added switch in settings for coloured_clay mod compatibility 2020-06-13 19:01:11 +01:00
TenPlus1
b7b3b98003 add unifieddye check for light grey recipe 2020-03-06 12:31:53 +00:00
1ba54476b1 Merge branch 'master' of yunohost.local:mtcontrib/bakedclay into nalc-1.2-dev 2019-12-21 13:21:18 +01:00
tenplus1
3af99b27c9 technic_cnc support 2019-09-10 09:16:04 +01:00
TenPlus1
9ec581dbf2 remove uncraftable dye:natural recipe 2019-07-23 18:27:03 +01:00
TenPlus1
d6a2fbaaee cooking clay block gives natural baked clay which can be dyed, added lucky block 2019-07-23 08:06:08 +01:00
23 changed files with 214 additions and 39 deletions

View File

@@ -2,11 +2,15 @@ Baked Clay
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.
Cooking baked clay turns it into glazed terracotta blocks.
https://forum.minetest.net/viewtopic.php?id=8890
Changelog:
- 1.0 - Added glazed terracotta blocks when you cook baked clay in furnace (thanks D3monPixel)
- 0.9 - Baked clay now works in the technic cnc machine
- 0.8 - Cooking clay block in furnace gives natural baked clay which you can dye
- 0.7 - Added support for stairsplus so that stairs are registered properly
- 0.6 - Added 3 new flowers and a new grass that are used for missing dyes
- 0.5 - Now using minecraft recipe to colour baked clay (8x baked clay, 1x dye in centre)
@@ -15,4 +19,7 @@ Changelog:
- 0.2 - Any colour of baked clay can be re-dyed into another colour
- 0.1 - Initial Release
Lucky Blocks: 8
Lucky Blocks: 10
Note: Under settings you will find 'colored_clay_compatibility' switch that when enabled will register aliases for the older colored clay mod and it's stairplus stairs.

View File

@@ -2,3 +2,4 @@ default
stairs
moreblocks?
lucky_block?
technic_cnc?

230
init.lua
View File

@@ -2,6 +2,7 @@
-- Baked Clay by TenPlus1
local clay = {
{"natural", "Natural"},
{"white", "White"},
{"grey", "Grey"},
{"black", "Black"},
@@ -16,50 +17,60 @@ local clay = {
{"brown", "Brown"},
{"pink", "Pink"},
{"dark_grey", "Dark Grey"},
{"dark_green", "Dark Green"},
{"dark_green", "Dark Green"}
}
local techcnc_mod = minetest.get_modpath("technic_cnc")
local stairs_mod = minetest.get_modpath("stairs")
local stairsplus_mod = minetest.get_modpath("moreblocks")
and minetest.global_exists("stairsplus")
for _, clay in pairs(clay) do
-- node definition
-- node
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(),
sounds = default.node_sound_stone_defaults()
})
-- craft from dye and any baked clay
-- craft recipe
minetest.register_craft({
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"}
},
})
if clay[1] ~= "natural" then
-- register stairsplus stairs if found
minetest.register_craft({
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"}
}
})
end
-- stairs plus
if stairsplus_mod then
stairsplus:register_all("bakedclay", "baked_clay_" .. clay[1], "bakedclay:" .. clay[1], {
stairsplus:register_all("bakedclay", "baked_clay_" .. clay[1],
"bakedclay:" .. clay[1], {
description = clay[2] .. " Baked Clay",
tiles = {"baked_clay_" .. clay[1] .. ".png"},
groups = {cracky = 3},
sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_stone_defaults()
})
stairsplus:register_alias_all("bakedclay", clay[1], "bakedclay", "baked_clay_" .. clay[1])
minetest.register_alias("stairs:slab_bakedclay_".. clay[1], "bakedclay:slab_baked_clay_" .. clay[1])
minetest.register_alias("stairs:stair_bakedclay_".. clay[1], "bakedclay:stair_baked_clay_" .. clay[1])
stairsplus:register_alias_all("bakedclay", clay[1],
"bakedclay", "baked_clay_" .. clay[1])
-- register all stair types for stairs redo
minetest.register_alias("stairs:slab_bakedclay_".. clay[1],
"bakedclay:slab_baked_clay_" .. clay[1])
minetest.register_alias("stairs:stair_bakedclay_".. clay[1],
"bakedclay:stair_baked_clay_" .. clay[1])
-- stairs redo
elseif stairs_mod and stairs.mod then
stairs.register_all("bakedclay_" .. clay[1], "bakedclay:" .. clay[1],
@@ -68,7 +79,7 @@ for _, clay in pairs(clay) do
clay[2] .. " Baked Clay",
default.node_sound_stone_defaults())
-- register stair and slab using default stairs
-- default stairs
elseif stairs_mod then
stairs.register_stair_and_slab("bakedclay_".. clay[1], "bakedclay:".. clay[1],
@@ -78,13 +89,72 @@ for _, clay in pairs(clay) do
clay[2] .. " Baked Clay Slab",
default.node_sound_stone_defaults())
end
-- register bakedclay for use in technic_cnc mod
if techcnc_mod then
technic_cnc.register_all("bakedclay:" .. clay[1],
{cracky = 3, not_in_creative_inventory = 1},
{"baked_clay_" .. clay[1] .. ".png"},
clay[2] .. " Baked Clay")
end
end
-- Terracotta blocks (textures by D3monPixel, thanks for use :)
for _, clay in pairs(clay) do
if clay[1] ~= "natural" then
local texture = "baked_clay_terracotta_" .. clay[1] ..".png"
minetest.register_node("bakedclay:terracotta_" .. clay[1], {
description = clay[2] .. " Glazed Terracotta",
tiles = {
texture .. "",
texture .. "",
texture .. "^[transformR180",
texture .. "",
texture .. "^[transformR270",
texture .. "^[transformR90",
},
paramtype2 = "facedir",
groups = {cracky = 3, terracotta = 1},
sounds = default.node_sound_stone_defaults(),
on_place = minetest.rotate_node
})
minetest.register_craft({
type = "cooking",
output = "bakedclay:terracotta_" .. clay[1],
recipe = "bakedclay:" .. clay[1]
})
end
end
-- special light blue glazed terracotta block
local texture = "baked_clay_terracotta_light_blue.png"
minetest.register_node("bakedclay:terracotta_light_blue", {
description = "Light Blue Glazed Terracotta",
tiles = {
texture .. "",
texture .. "",
texture .. "^[transformR180",
texture .. "",
texture .. "^[transformR270",
texture .. "^[transformR90",
},
paramtype2 = "facedir",
groups = {cracky = 3, terracotta = 1},
sounds = default.node_sound_stone_defaults(),
on_place = minetest.rotate_node
})
-- cook clay block into white baked clay
minetest.register_craft({
type = "cooking",
output = "bakedclay:white",
output = "bakedclay:natural",
recipe = "default:clay",
})
@@ -129,10 +199,17 @@ local function add_simple_flower(name, desc, box, f_groups)
end
local flowers = {
{"delphinium", "Blue Delphinium", {-0.15, -0.5, -0.15, 0.15, 0.3, 0.15}, {color_cyan = 1}},
{"thistle", "Thistle", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_magenta = 1}},
{"lazarus", "Lazarus Bell", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_pink = 1}},
{"mannagrass", "Reed Mannagrass", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_dark_green = 1}},
{"delphinium", "Blue Delphinium",
{-0.15, -0.5, -0.15, 0.15, 0.3, 0.15}, {color_cyan = 1}},
{"thistle", "Thistle",
{-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_magenta = 1}},
{"lazarus", "Lazarus Bell",
{-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_pink = 1}},
{"mannagrass", "Reed Mannagrass",
{-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_dark_green = 1}}
}
for _,item in pairs(flowers) do
@@ -155,7 +232,7 @@ minetest.register_decoration({
},
y_min = 10,
y_max = 90,
decoration = "bakedclay:delphinium",
decoration = "bakedclay:delphinium"
})
minetest.register_decoration({
@@ -172,7 +249,7 @@ minetest.register_decoration({
},
y_min = 15,
y_max = 90,
decoration = "bakedclay:thistle",
decoration = "bakedclay:thistle"
})
minetest.register_decoration({
@@ -191,7 +268,7 @@ minetest.register_decoration({
y_max = 90,
decoration = "bakedclay:lazarus",
spawn_by = "default:jungletree",
num_spawn_by = 1,
num_spawn_by = 1
})
minetest.register_decoration({
@@ -210,29 +287,110 @@ minetest.register_decoration({
y_max = 15,
decoration = "bakedclay:mannagrass",
spawn_by = "group:water",
num_spawn_by = 1,
num_spawn_by = 1
})
-- add lucky blocks
-- lucky blocks
if minetest.get_modpath("lucky_block") then
local p = "bakedclay:"
lucky_block:add_blocks({
{"dro", {"bakedclay:"}, 10, true},
{"fal", {p.."black", p.."blue", p.."brown", p.."cyan", p.."dark_green",
p.."dark_grey", p.."green", p.."grey", p.."magenta", p.."orange",
p.."pink", p.."red", p.."violet", p.."white", p.."yellow"}, 0},
p.."pink", p.."red", p.."violet", p.."white", p.."yellow", p.."natural"}, 0},
{"fal", {p.."black", p.."blue", p.."brown", p.."cyan", p.."dark_green",
p.."dark_grey", p.."green", p.."grey", p.."magenta", p.."orange",
p.."pink", p.."red", p.."violet", p.."white", p.."yellow"}, 0, true},
p.."pink", p.."red", p.."violet", p.."white", p.."yellow", p.."natural"}, 0, true},
{"dro", {p.."delphinium"}, 5},
{"dro", {p.."lazarus"}, 5},
{"dro", {p.."mannagrass"}, 5},
{"dro", {p.."thistle"}, 6},
{"flo", 5, {p.."black", p.."blue", p.."brown", p.."cyan", p.."dark_green",
p.."dark_grey", p.."green", p.."grey", p.."magenta", p.."orange",
p.."pink", p.."red", p.."violet", p.."white", p.."yellow"}, 2},
{"flo", 5, {p.."natural", p.."black", p.."blue", p.."brown", p.."cyan",
p.."dark_green", p.."dark_grey", p.."green", p.."grey", p.."magenta",
p.."orange", p.."pink", p.."red", p.."violet", p.."white", p.."yellow"}, 2},
{"nod", "default:chest", 0, {
{name = p.."natural", max = 30},
{name = p.."black", max = 30},
{name = p.."blue", max = 30},
{name = p.."brown", max = 30},
{name = p.."cyan", max = 30},
{name = p.."dark_green", max = 30},
{name = p.."dark_grey", max = 30},
{name = p.."green", max = 30},
{name = p.."grey", max = 30},
{name = p.."magenta", max = 30},
{name = p.."orange", max = 30},
{name = p.."pink", max = 30},
{name = p.."red", max = 30},
{name = p.."violet", max = 30},
{name = p.."white", max = 30},
{name = p.."yellow", max = 30}
}},
})
p = "bakedclay:terracotta_"
lucky_block:add_blocks({
{"nod", "default:chest", 0, {
{name = p.."light_blue", max = 20},
{name = p.."black", max = 20},
{name = p.."blue", max = 20},
{name = p.."brown", max = 20},
{name = p.."cyan", max = 20},
{name = p.."dark_green", max = 20},
{name = p.."dark_grey", max = 20},
{name = p.."green", max = 20},
{name = p.."grey", max = 20},
{name = p.."magenta", max = 20},
{name = p.."orange", max = 20},
{name = p.."pink", max = 20},
{name = p.."red", max = 20},
{name = p.."violet", max = 20},
{name = p.."white", max = 20},
{name = p.."yellow", max = 20}
}}
})
end
minetest.log("action", "[bakedclay] loaded.")
-- colored clay compatibility
if minetest.settings:get_bool("colored_clay_compatibility") == true then
local cc = {
{"black", "black"},
{"blue", "blue"},
{"bright", "natural"},
{"brown", "brown"},
{"cyan", "cyan"},
{"dark_green", "dark_green"},
{"dark_grey", "dark_grey"},
{"green", "green"},
{"grey", "grey"},
{"hardened", "natural"},
{"magenta", "magenta"},
{"orange", "orange"},
{"pink", "pink"},
{"red", "red"},
{"violet", "violet"},
{"white", "white"},
{"yellow", "yellow"}
}
for n = 1, #cc do
local nod1 = "colored_clay:" .. cc[n][1]
local nod2 = "bakedclay:" .. cc[n][2]
minetest.register_alias(nod1, nod2)
if stairsplus_mod then
stairsplus:register_alias_all("colored_clay", cc[n][1], "bakedclay", cc[n][2])
end
end
end
minetest.log("action", "[MOD] Baked Clay loaded.")

View File

@@ -19,3 +19,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Textures by D3monPixel (https://mcpedl.com/better-glazed-terracotta-pack)
baked_clay_terracotta*.png

View File

@@ -1 +1,4 @@
name = bakedclay
depends = default
optional_depends = stairs, moreblocks, lucky_block, technic_cnc
description = Adds the ability to bake clay into blocks and colour them with dye.

2
settingtypes.txt Normal file
View File

@@ -0,0 +1,2 @@
# Registers compatibility aliases with the older colored_clay mod
colored_clay_compatibility (Colored Clay Compatibility) bool false

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B