From 594aebfa45e9115fa628f0d9b29f910b13f4dd6d Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 5 Sep 2017 03:51:13 +0200 Subject: [PATCH] Add new spruce schematics --- mods/ITEMS/mcl_core/functions.lua | 14 +++++- .../mcl_core/schematics/mcl_core_spruce_1.mts | Bin 0 -> 207 bytes .../mcl_core/schematics/mcl_core_spruce_2.mts | Bin 0 -> 207 bytes .../mcl_core/schematics/mcl_core_spruce_3.mts | Bin 0 -> 230 bytes mods/ITEMS/mcl_core/schematics/pine_tree.mts | Bin 176 -> 0 bytes mods/MAPGEN/mcl_biomes/init.lua | 42 ++++++++++++++++-- 6 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 mods/ITEMS/mcl_core/schematics/mcl_core_spruce_1.mts create mode 100644 mods/ITEMS/mcl_core/schematics/mcl_core_spruce_2.mts create mode 100644 mods/ITEMS/mcl_core/schematics/mcl_core_spruce_3.mts delete mode 100644 mods/ITEMS/mcl_core/schematics/pine_tree.mts diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index f6289934dc..4503c3c61f 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -238,7 +238,11 @@ function mcl_core.generate_tree(pos, tree_type, two_by_two) if two_by_two then mcl_core.generate_huge_spruce_tree(pos) else - mcl_core.generate_spruce_tree(pos) + if mg_name == "v6" then + mcl_core.generate_v6_spruce_tree(pos) + else + mcl_core.generate_spruce_tree(pos) + end end elseif tree_type == 4 then mcl_core.generate_acacia_tree(pos) @@ -353,7 +357,7 @@ local function add_spruce_leaves(data, vi, c_air, c_ignore, c_snow, c_spruce_lea end end -function mcl_core.generate_spruce_tree(pos) +function mcl_core.generate_v6_spruce_tree(pos) local x, y, z = pos.x, pos.y, pos.z local maxy = y + math.random(9, 13) -- Trunk top @@ -449,6 +453,12 @@ function mcl_core.generate_spruce_tree(pos) vm:write_to_map() end +mcl_core.generate_spruce_tree = function(pos) + local r = math.random(1, 3) + local path = minetest.get_modpath("mcl_core") .. "/schematics/mcl_core_spruce_"..r..".mts" + minetest.place_schematic({ x = pos.x - 3, y = pos.y - 1, z = pos.z - 3 }, path, "0", nil, false) +end + mcl_core.generate_huge_spruce_tree = function(pos) local r = math.random(1, 3) local path = minetest.get_modpath("mcl_core") .. "/schematics/mcl_core_spruce_huge_"..r..".mts" diff --git a/mods/ITEMS/mcl_core/schematics/mcl_core_spruce_1.mts b/mods/ITEMS/mcl_core/schematics/mcl_core_spruce_1.mts new file mode 100644 index 0000000000000000000000000000000000000000..46534506dfc28a6de2c631024877a539d68dc530 GIT binary patch literal 207 zcmeYb3HD`RVPI$AVPLnf2ZP-D-1>S3W(MZO%pwNS+~l12*EtF?`PhQy|U4C8S7@|V=K*-0lD#8<^TWy literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/schematics/mcl_core_spruce_2.mts b/mods/ITEMS/mcl_core/schematics/mcl_core_spruce_2.mts new file mode 100644 index 0000000000000000000000000000000000000000..69aaae76768c86b923005d758f212ad3fcc01c94 GIT binary patch literal 207 zcmeYb3HD`RVPI$AWnj0j2Z7v_+?4wIPzGiO=ETe*2GQK)ocQGYqExHmf}+yo)ST4B zveaS*VKm{AqSVxiId4NQavf0M@TuS9U(OwQ`C3}QrKWT38{WLzq|xHoAoH3bdNG_wi@wI_2RxUbEA>g^%Zj#7X93oHaGDN@7b57`qyf%+y8M+YLYL0bd5>* wiQcOmyJwLL1FkA2TbK(63r`jdKD8z!!zQ5pby!w=ob|p5y}a@=kuPk!0kNA`QUCw| literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/schematics/mcl_core_spruce_3.mts b/mods/ITEMS/mcl_core/schematics/mcl_core_spruce_3.mts new file mode 100644 index 0000000000000000000000000000000000000000..2b2af62b73cf446cb0559cd15a6d894718f7efc2 GIT binary patch literal 230 zcmeYb3HD`RVPI$AV_>(h2Z6lO+R`c@&A`mSoS0d}Aex(;6Q7)4lxkI6P*j?nnvS=bC*}=(zLcCC`J*7z{P)_boj1ao?Z9 zY1?9^obp-mBp}l3q{h@=z8Puab4nhq^Z&l3`Nr2(J^OOCKbdo|ez$yo;Q0Ul?3Vi@ zSN0k*DVJ`0F0Uo2Yh#q~V1~z2y*Bp%4sQ|nO^tcwRXPv6GM8-A-N@YY_Ci{q|FP6#sisx1lv4L44QEnay{ zGxJs7r=rQ()^ocp?Ze-Pe0+DUOw{x1!PwBH*CJmzb82~<3s_*;T>IsJubl0gGkTg+ Q+mEcP(>cV(nP|!f0N>9^{{R30 diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index cd2e195eca..59e36adf71 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -1124,8 +1124,8 @@ local function register_decorations() place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"}, sidelen = 16, noise_params = { - offset = 0.02, - scale = 0.0022, + offset = 0.0062, + scale = 0.0006, spread = {x = 250, y = 250, z = 250}, seed = 2500, octaves = 3, @@ -1134,7 +1134,43 @@ local function register_decorations() biomes = {"taiga", "coniferous_forest"}, y_min = 2, y_max = mcl_vars.mg_overworld_max, - schematic = minetest.get_modpath("mcl_core").."/schematics/pine_tree.mts", + schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_spruce_1.mts", + flags = "place_center_x, place_center_z", + }) + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"}, + sidelen = 16, + noise_params = { + offset = 0.0065, + scale = 0.0006, + spread = {x = 250, y = 250, z = 250}, + seed = 5000, + octaves = 3, + persist = 0.66 + }, + biomes = {"taiga", "coniferous_forest"}, + y_min = 2, + y_max = mcl_vars.mg_overworld_max, + schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_spruce_2.mts", + flags = "place_center_x, place_center_z", + }) + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"}, + sidelen = 16, + noise_params = { + offset = 0.005, + scale = 0.0006, + spread = {x = 250, y = 250, z = 250}, + seed = 7500, + octaves = 3, + persist = 0.66 + }, + biomes = {"taiga", "coniferous_forest"}, + y_min = 2, + y_max = mcl_vars.mg_overworld_max, + schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_spruce_3.mts", flags = "place_center_x, place_center_z", }) minetest.register_decoration({