forked from LizzyFleckenstein03/Memeclone
Grow proper acacia tree from acacia saplings
This commit is contained in:
parent
b5b8561483
commit
de10e2e1a8
|
@ -1,6 +1,9 @@
|
||||||
MineClone 2 core mod
|
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:
|
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
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
http://www.gnu.org/licenses/lgpl-2.1.html
|
|
||||||
|
|
||||||
License of all textures and sounds
|
License of all textures and sounds
|
||||||
==================================
|
----------------------------------
|
||||||
MIT License.
|
MIT License.
|
||||||
|
|
||||||
The textures are taken from the Minecraft resource pack “Faithful 1.11” by Vattic and
|
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.
|
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.
|
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 <celeron55@gmail.com>
|
||||||
|
CC BY-SA 3.0 <https://creativecommons.org/licenses/by-sa/3.0/>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -416,6 +416,8 @@ function mcl_core.generate_tree(pos, trunk, leaves, typearbre)
|
||||||
end
|
end
|
||||||
elseif typearbre == 3 then
|
elseif typearbre == 3 then
|
||||||
mcl_core.generate_spruce_tree(pos)
|
mcl_core.generate_spruce_tree(pos)
|
||||||
|
elseif typearbre == 4 then
|
||||||
|
mcl_core.grow_new_acacia_tree(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -529,6 +531,14 @@ end
|
||||||
|
|
||||||
-- END of spruce tree functions --
|
-- 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)
|
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
|
elseif node.name == "mcl_core:junglesapling" then
|
||||||
grow = sapling_grow_action("mcl_core:jungletree", "mcl_core:jungleleaves", 1, 2)
|
grow = sapling_grow_action("mcl_core:jungletree", "mcl_core:jungleleaves", 1, 2)
|
||||||
elseif node.name == "mcl_core:acaciasapling" then
|
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
|
elseif node.name == "mcl_core:sprucesapling" then
|
||||||
grow = sapling_grow_action("mcl_core:sprucetree", "mcl_core:spruceleaves", 3, 1)
|
grow = sapling_grow_action("mcl_core:sprucetree", "mcl_core:spruceleaves", 3, 1)
|
||||||
elseif node.name == "mcl_core:birchsapling" then
|
elseif node.name == "mcl_core:birchsapling" then
|
||||||
|
|
|
@ -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:podzol", "nodes", "mcl_core:podzol_snow")
|
||||||
doc.add_entry_alias("nodes", "mcl_core:mycelium", "nodes", "mcl_core:mycelium_snow")
|
doc.add_entry_alias("nodes", "mcl_core:mycelium", "nodes", "mcl_core:mycelium_snow")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Node aliases
|
||||||
|
|
||||||
|
minetest.register_alias("default:acacia_tree", "mcl_core:acaciatree")
|
||||||
|
minetest.register_alias("default:acacia_leaves", "mcl_core:acacialeaves")
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue