From e4e72c437c1a0851d7ebfa34a81a4cfa4a7b5086 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Fri, 14 Oct 2016 20:57:09 +0100 Subject: [PATCH] Add new flora to be used for missing dyes --- README.md | 1 + init.lua | 120 ++++++++++++++++++++++++++++- textures/baked_clay_delphinium.png | Bin 0 -> 214 bytes textures/baked_clay_lazarus.png | Bin 0 -> 170 bytes textures/baked_clay_mannagrass.png | Bin 0 -> 201 bytes textures/baked_clay_thistle.png | Bin 0 -> 154 bytes 6 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 textures/baked_clay_delphinium.png create mode 100644 textures/baked_clay_lazarus.png create mode 100644 textures/baked_clay_mannagrass.png create mode 100644 textures/baked_clay_thistle.png diff --git a/README.md b/README.md index bb8ba2c..68f7d02 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ https://forum.minetest.net/viewtopic.php?id=8890 Changelog: +- 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) - 0.4 - Code tweak and tidy - 0.3 - Added Stairs and Slabs for each colour diff --git a/init.lua b/init.lua index 33b3218..b2d4c3b 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,5 @@ --- Baked Clay (0.5) by TenPlus1 +-- Baked Clay (0.6) by TenPlus1 local clay = { {"white", "White"}, @@ -94,4 +94,122 @@ minetest.register_craft( { recipe = {"default:dry_shrub"} }) +-- 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 + +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)) +end + +-- mapgen for new flowers + +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"}, + 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, +}) + print ("[MOD] Baked Clay loaded") diff --git a/textures/baked_clay_delphinium.png b/textures/baked_clay_delphinium.png new file mode 100644 index 0000000000000000000000000000000000000000..51b8ef9f5f7953c4cbd5e4696d82916ce8a37a9a GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa4)6(aHDq9rcjC|r;4zL7buCbI z&AXV~ce-NH-Ts|lb}6gA1}bAL3GxeOaCmkj4amv#ba4#fxbE7uk+(rX#6>^pz&%!v z5{4eWh8GMfQdw3}Rxrrke8{aE1yFZiSlaoDt@kTa*%@?W`7*^dAbH2Qzwq%{%_P^cZO3VNN literal 0 HcmV?d00001 diff --git a/textures/baked_clay_lazarus.png b/textures/baked_clay_lazarus.png new file mode 100644 index 0000000000000000000000000000000000000000..548a4b102495b62575f2e68e81b987447a44fcd0 GIT binary patch literal 170 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^4e$wZ-K`y|8Y-_DqjX9qMmJsc zx_QPmmqMGPmTQ3u7)yfuf*Bm1-ADs+oIPC}LpZJ{CmdjlkXgXPE+(OTgF)$VS`JU* z2DRCau0FmCmDa2gU}J6;no(AikQBf$d(jdG)8m3^tinA9Inp^8I2odzv-HWtubm1s Oj=|H_&t;ucLK6VfIxuno literal 0 HcmV?d00001 diff --git a/textures/baked_clay_mannagrass.png b/textures/baked_clay_mannagrass.png new file mode 100644 index 0000000000000000000000000000000000000000..295d41d669130b62b618ff12259d1551b0c362f6 GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^3h)VWP0r8JaAG$O<*-TSw9n*n zE9IVfL?9X{%UBZR7tG-B>_!@plj`Z>7{YN~x6hI9fC2}Lcu)D#Z+=_$Zm(_p)%5Sb zsi>}sj^btpi{#e6FCuH6u4a?+I>Zs#=-|V%?PBHYN86vR+Bj=T)#vh?iKlI?*_F3jWu{h;z#^^9 z=82+*jjucA%ZIk<+&9xp1}bAL3GxeOaCmkj4am{;ba4#fxSpJ_Kw^oCgQOo{0Gsuc xv{c=OOiui~?4Bb}}7GGBshH#IUi5