From de10e2e1a8cdcddcada4da5fee26fca82d722848 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 26 May 2017 02:36:25 +0200 Subject: [PATCH] Grow proper acacia tree from acacia saplings --- mods/ITEMS/mcl_core/README.txt | 18 ++++++++++++++---- mods/ITEMS/mcl_core/functions.lua | 12 +++++++++++- mods/ITEMS/mcl_core/nodes.lua | 6 ++++++ .../ITEMS/mcl_core/schematics/acacia_tree.mts | Bin 0 -> 204 bytes .../schematics/acacia_tree_from_sapling.mts | Bin 0 -> 205 bytes 5 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 mods/ITEMS/mcl_core/schematics/acacia_tree.mts create mode 100644 mods/ITEMS/mcl_core/schematics/acacia_tree_from_sapling.mts diff --git a/mods/ITEMS/mcl_core/README.txt b/mods/ITEMS/mcl_core/README.txt index e6fcca1c4..6c48d74fd 100644 --- a/mods/ITEMS/mcl_core/README.txt +++ b/mods/ITEMS/mcl_core/README.txt @@ -1,6 +1,9 @@ MineClone 2 core mod ==================== -Originally forked from Minetest Game's default mod in the distant past +Originally forked from Minetest Game's default mod in the distant past. + +License information +=================== License of source code: ----------------------- @@ -11,10 +14,8 @@ it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. -http://www.gnu.org/licenses/lgpl-2.1.html - License of all textures and sounds -================================== +---------------------------------- MIT License. The textures are taken from the Minecraft resource pack “Faithful 1.11” by Vattic and @@ -24,3 +25,12 @@ Sounds ====== All sounds included in this mod are under the MIT License. The other sounds used in this mod can be found in CORE/mcl_sounds. + +http://www.gnu.org/licenses/lgpl-2.1.html + +License of everything not listed here +------------------------------------- +celeron55, Perttu Ahola +CC BY-SA 3.0 + + diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index de4fe0ad9..1d3723f93 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -416,6 +416,8 @@ function mcl_core.generate_tree(pos, trunk, leaves, typearbre) end elseif typearbre == 3 then mcl_core.generate_spruce_tree(pos) + elseif typearbre == 4 then + mcl_core.grow_new_acacia_tree(pos) end end @@ -529,6 +531,14 @@ end -- END of spruce tree functions -- +-- Acacia tree grow function from Minetest Game 0.4.15 +function mcl_core.grow_new_acacia_tree(pos) + local path = minetest.get_modpath("mcl_core") .. + "/schematics/acacia_tree_from_sapling.mts" + minetest.place_schematic({x = pos.x - 4, y = pos.y - 1, z = pos.z - 4}, path, "random", nil, false) +end + + local grass_spread_randomizer = PseudoRandom(minetest.get_mapgen_params().seed) ------------------------------ @@ -666,7 +676,7 @@ mcl_core.grow_sapling = function(pos, node) elseif node.name == "mcl_core:junglesapling" then grow = sapling_grow_action("mcl_core:jungletree", "mcl_core:jungleleaves", 1, 2) elseif node.name == "mcl_core:acaciasapling" then - grow = sapling_grow_action("mcl_core:acaciatree", "mcl_core:acacialeaves", 1, 2) + grow = sapling_grow_action("mcl_core:acaciatree", "mcl_core:acacialeaves", 4, 2) elseif node.name == "mcl_core:sprucesapling" then grow = sapling_grow_action("mcl_core:sprucetree", "mcl_core:spruceleaves", 3, 1) elseif node.name == "mcl_core:birchsapling" then diff --git a/mods/ITEMS/mcl_core/nodes.lua b/mods/ITEMS/mcl_core/nodes.lua index be939267e..c74a1d679 100644 --- a/mods/ITEMS/mcl_core/nodes.lua +++ b/mods/ITEMS/mcl_core/nodes.lua @@ -2051,3 +2051,9 @@ if minetest.get_modpath("doc") then doc.add_entry_alias("nodes", "mcl_core:podzol", "nodes", "mcl_core:podzol_snow") doc.add_entry_alias("nodes", "mcl_core:mycelium", "nodes", "mcl_core:mycelium_snow") end + +-- Node aliases + +minetest.register_alias("default:acacia_tree", "mcl_core:acaciatree") +minetest.register_alias("default:acacia_leaves", "mcl_core:acacialeaves") + diff --git a/mods/ITEMS/mcl_core/schematics/acacia_tree.mts b/mods/ITEMS/mcl_core/schematics/acacia_tree.mts new file mode 100644 index 0000000000000000000000000000000000000000..4732ade3d9df99c4f543ad168dc090e551cfdee5 GIT binary patch literal 204 zcmeYb3HD`RVc=xoVBoB;x332Q24)84#LOZF(UjD*#L}D+tHk8Q)YOVOZztU4Yf#{Dn=1ZHu%;wys@gvT-A!jJ_b_hUtluNqvDdFQXx7;|?5iqI z3BR>bxcBXix_RbZj~j1ZFguwWwX>*Py)YOVOZzm-3H7IbnP310T>5E%?$z@9B#N2hyUt?T1xBr;- xU%TSbQdgVF(tK=EpIrhU-M)W+2CwlY!zJqTW*k3t*>?8)`O_mA<#y}H0RTx+Sp)z8 literal 0 HcmV?d00001