Compare commits

...

22 Commits

Author SHA1 Message Date
b98f6c38f1 Merge remote-tracking branch 'upstream/master' 2022-08-26 14:49:16 +02:00
95a4b96478 tidy code, hide grey recipes if unifieddye present 2022-08-23 08:22:26 +01:00
0514845098 Merge remote-tracking branch 'upstream/master' 2021-10-04 21:30:44 +02:00
975bee9898 update screenshot 2021-10-04 08:15:20 +01:00
0e43ab505c missing glazed terracotta colours added by firefox 2021-10-04 08:08:49 +01:00
3e0ef20bd8 Merge remote-tracking branch 'upstream/master' 2021-08-04 21:37:41 +02:00
07afd28b2f added support for flowerpot mod 2021-08-03 20:32:21 +01:00
599158ff67 Merge remote-tracking branch 'upstream/master' 2021-08-01 18:56:37 +02:00
f78b47d9c2 re-added glazed terracotta textures (thanks Amara2_MK) 2021-07-29 21:26:07 +01:00
762100db46 Merge remote-tracking branch 'upstream/master' 2021-07-05 22:07:21 +02:00
f3e0b60827 remove purge test 2021-07-05 13:08:01 +01:00
a3c96afbda tweak and tidy code, add lucky block 2021-07-05 10:20:29 +01:00
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
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
dd7749131c added switch in settings for coloured_clay mod compatibility 2020-06-13 19:01:11 +01:00
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
3af99b27c9 technic_cnc support 2019-09-10 09:16:04 +01:00
9ec581dbf2 remove uncraftable dye:natural recipe 2019-07-23 18:27:03 +01:00
d6a2fbaaee cooking clay block gives natural baked clay which can be dyed, added lucky block 2019-07-23 08:06:08 +01:00
26 changed files with 326 additions and 157 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 - Re-Added glazed terracotta blocks when you cook baked clay in furnace (thanks Amara2_MK), added support for sofar's flowerpot mod, missing glazed textures re-coloured by firefox.
- 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,5 @@ default
stairs
moreblocks?
lucky_block?
technic_cnc?
flowerpot?

117
flowers.lua Normal file
View File

@ -0,0 +1,117 @@
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}}
}
-- register some new flowers to fill in missing dye colours
-- flower registration (borrowed from default game)
local function add_simple_flower(name, desc, box, f_groups)
f_groups.snappy = 3
f_groups.flower = 1
f_groups.flora = 1
f_groups.attached_node = 1
minetest.register_node("bakedclay:" .. name, {
description = desc,
drawtype = "plantlike",
waving = 1,
tiles = {"baked_clay_" .. name .. ".png"},
inventory_image = "baked_clay_" .. name .. ".png",
wield_image = "baked_clay_" .. name .. ".png",
sunlight_propagates = true,
paramtype = "light",
walkable = false,
buildable_to = true,
stack_max = 99,
groups = f_groups,
sounds = default.node_sound_leaves_defaults(),
selection_box = {type = "fixed", fixed = box}
})
end
for _,item in pairs(flowers) do
add_simple_flower(unpack(item))
end
-- add new flowers to mapgen
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.004,
spread = {x = 100, y = 100, z = 100},
seed = 7133,
octaves = 3,
persist = 0.6
},
y_min = 10,
y_max = 90,
decoration = "bakedclay:delphinium"
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass", "default:dirt_with_dry_grass"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.004,
spread = {x = 100, y = 100, z = 100},
seed = 7134,
octaves = 3,
persist = 0.6
},
y_min = 15,
y_max = 90,
decoration = "bakedclay:thistle"
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass", "default:dirt_with_rainforest_litter"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.01,
spread = {x = 100, y = 100, z = 100},
seed = 7135,
octaves = 3,
persist = 0.6
},
y_min = 1,
y_max = 90,
decoration = "bakedclay:lazarus",
spawn_by = "default:jungletree",
num_spawn_by = 1
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass", "default:sand"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.009,
spread = {x = 100, y = 100, z = 100},
seed = 7136,
octaves = 3,
persist = 0.6
},
y_min = 1,
y_max = 15,
decoration = "bakedclay:mannagrass",
spawn_by = "group:water",
num_spawn_by = 1
})

261
init.lua
View File

@ -2,6 +2,7 @@
-- Baked Clay by TenPlus1
local clay = {
{"natural", "Natural"},
{"white", "White"},
{"grey", "Grey"},
{"black", "Black"},
@ -16,25 +17,26 @@ 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
if clay[1] ~= "natural" then
minetest.register_craft({
output = "bakedclay:" .. clay[1] .. " 8",
@ -42,24 +44,31 @@ for _, clay in pairs(clay) do
{"group:bakedclay", "group:bakedclay", "group:bakedclay"},
{"group:bakedclay", "dye:" .. clay[1], "group:bakedclay"},
{"group:bakedclay", "group:bakedclay", "group:bakedclay"}
},
}
})
end
-- register stairsplus stairs if found
-- 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 +77,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,161 +87,119 @@ 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
-- cook clay block into white baked clay
-- Terracotta blocks
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
minetest.register_alias("bakedclay:terracotta_light_blue", "bakedclay:terracotta_cyan")
-- cook clay block into white baked clay
minetest.register_craft({
type = "cooking",
output = "bakedclay:white",
recipe = "default:clay",
output = "bakedclay:natural",
recipe = "default:clay"
})
-- 2x2 red bakedclay makes 16x clay brick
-- 2x2 red baked clay makes 16x clay brick
minetest.register_craft( {
output = "default:clay_brick 16",
recipe = {
{"bakedclay:red", "bakedclay:red"},
{"bakedclay:red", "bakedclay:red"},
{"bakedclay:red", "bakedclay:red"}
}
})
-- register some new flowers to fill in missing dye colours
-- flower registration (borrowed from default game)
-- colored clay compatibility
if minetest.settings:get_bool("colored_clay_compatibility") == true then
local function add_simple_flower(name, desc, box, f_groups)
f_groups.snappy = 3
f_groups.flower = 1
f_groups.flora = 1
f_groups.attached_node = 1
minetest.register_node("bakedclay:" .. name, {
description = desc,
drawtype = "plantlike",
waving = 1,
tiles = {"baked_clay_" .. name .. ".png"},
inventory_image = "baked_clay_" .. name .. ".png",
wield_image = "baked_clay_" .. name .. ".png",
sunlight_propagates = true,
paramtype = "light",
walkable = false,
buildable_to = true,
stack_max = 99,
groups = f_groups,
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = box
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
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}},
}
for _,item in pairs(flowers) do
add_simple_flower(unpack(item))
-- flowerpot mod
if minetest.get_modpath("flowerpot") then
flowerpot.register_node("bakedclay:delphinium")
flowerpot.register_node("bakedclay:thistle")
flowerpot.register_node("bakedclay:lazarus")
flowerpot.register_node("bakedclay:mannagrass")
end
-- mapgen for new flowers
-- get mod path
local path = minetest.get_modpath("bakedclay")
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.004,
spread = {x = 100, y = 100, z = 100},
seed = 7133,
octaves = 3,
persist = 0.6
},
y_min = 10,
y_max = 90,
decoration = "bakedclay:delphinium",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass", "default:dirt_with_dry_grass"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.004,
spread = {x = 100, y = 100, z = 100},
seed = 7134,
octaves = 3,
persist = 0.6
},
y_min = 15,
y_max = 90,
decoration = "bakedclay:thistle",
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass", "default:dirt_with_rainforest_litter"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.01,
spread = {x = 100, y = 100, z = 100},
seed = 7135,
octaves = 3,
persist = 0.6
},
y_min = 1,
y_max = 90,
decoration = "bakedclay:lazarus",
spawn_by = "default:jungletree",
num_spawn_by = 1,
})
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass", "default:sand"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.009,
spread = {x = 100, y = 100, z = 100},
seed = 7136,
octaves = 3,
persist = 0.6
},
y_min = 1,
y_max = 15,
decoration = "bakedclay:mannagrass",
spawn_by = "group:water",
num_spawn_by = 1,
})
-- add lucky blocks
-- add new flowers
dofile(path .. "/flowers.lua")
-- add lucky blocks if mod present
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},
{"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},
{"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},
})
dofile(path .. "/lucky_block.lua")
end
minetest.log("action", "[bakedclay] loaded.")
print ("[MOD] Baked Clay loaded")

View File

@ -19,3 +19,10 @@ 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 Amara2_MK (Creative Commons)
https://www.curseforge.com/minecraft/texture-packs/glazed-terracotta-revamp
baked_clay_terracotta*.png
Missing gray, light gray, black and green textures re-coloured by Firefox.

64
lucky_block.lua Normal file
View File

@ -0,0 +1,64 @@
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", 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", p.."natural"
}, 0, true},
{"dro", {p.."delphinium"}, 5},
{"dro", {p.."lazarus"}, 5},
{"dro", {p.."mannagrass"}, 5},
{"dro", {p.."thistle"}, 6},
{"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.."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}
}}
})

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 81 KiB

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: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 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: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 B