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 f6289934d..4503c3c61 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+S01}`g#Ut2Ij=fA_mdiWX52qQNM5Dp^y9i z6i(X~Gv$=eiYEb)UMDrC{_@R86Q5J^Xr2G}EzLK+uIkyBtNqEGgY~=R`vb@S|7W+{ zAGxyEkV(08+jDs>NnIPGgao%)He2ywuc` zoYZ0lK@`!FqSVxiId6laxegd`bnngRe;`=&WnJ}yU#fSvyh+#WP*iPE5NNn@I&AUE zW15+-`aTs+&bFT0ZD}9=KIG%OYh|LIUk}EHF1;4{%9&Hk<6OW3%jViI|9j