Height 20 to 32 nodes.
Dependent on chunksize >= 5.
Base limited to maximum altitude y = 32.
Craft sapling from 9 jungle saplings.
default_silver_sandstone_block.png -- Derived from a texture by GreenXenith (CC-BY-SA 3.0)
default_bookshelf_slot.png -- Derived from a texture by Gambit (CC-BY-SA 3.0)
default_marram_grass_*.png -- Derived from textures by TumeniNodes (CC-BY-SA 3.0)
+ default_emergent_jungle_sapling.png
TumeniNodes (CC BY-SA 3.0):
default_desert_cobble.png -- Derived from a texture by brunob.santos (CC BY-SA 3.0)
}
})
+minetest.register_craft({
+ output = "default:emergent_jungle_sapling",
+ recipe = {
+ {"default:junglesapling", "default:junglesapling", "default:junglesapling"},
+ {"default:junglesapling", "default:junglesapling", "default:junglesapling"},
+ {"default:junglesapling", "default:junglesapling", "default:junglesapling"},
+ }
+})
+
+
--
-- Crafting (tool repair)
--
+
minetest.register_craft({
type = "toolrepair",
additional_wear = -0.02,
})
+
--
-- Cooking recipes
--
cooktime = 5,
})
+
--
-- Fuels
--
burntime = 6,
})
+minetest.register_craft({
+ type = "fuel",
+ recipe = "default:emergent_jungle_sapling",
+ burntime = 7,
+})
+
minetest.register_craft({
type = "fuel",
rotation = "random",
})
+ -- Emergent jungle tree
+ -- Due to 32 node height, altitude is limited and prescence depends on chunksize
+
+ local chunksize = tonumber(minetest.get_mapgen_setting("chunksize"))
+ if chunksize >= 5 then
+ minetest.register_decoration({
+ deco_type = "schematic",
+ place_on = {"default:dirt_with_rainforest_litter"},
+ sidelen = 80,
+ noise_params = {
+ offset = 0.0,
+ scale = 0.0025,
+ spread = {x = 250, y = 250, z = 250},
+ seed = 2685,
+ octaves = 3,
+ persist = 0.7
+ },
+ biomes = {"rainforest"},
+ y_min = 1,
+ y_max = 32,
+ schematic = minetest.get_modpath("default") ..
+ "/schematics/emergent_jungle_tree.mts",
+ flags = "place_center_x, place_center_z",
+ rotation = "random",
+ place_offset_y = -4,
+ })
+ end
+
-- Jungle tree and log
minetest.register_decoration({
default:junglewood
default:jungleleaves
default:junglesapling
+default:emergent_jungle_sapling
default:pine_tree
default:pine_wood
end,
})
+minetest.register_node("default:emergent_jungle_sapling", {
+ description = "Emergent Jungle Tree Sapling",
+ drawtype = "plantlike",
+ tiles = {"default_emergent_jungle_sapling.png"},
+ inventory_image = "default_emergent_jungle_sapling.png",
+ wield_image = "default_emergent_jungle_sapling.png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ on_timer = default.grow_sapling,
+ selection_box = {
+ type = "fixed",
+ fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
+ },
+ groups = {snappy = 2, dig_immediate = 3, flammable = 2,
+ attached_node = 1, sapling = 1},
+ sounds = default.node_sound_leaves_defaults(),
+
+ on_construct = function(pos)
+ minetest.get_node_timer(pos):start(math.random(300, 1500))
+ end,
+
+ on_place = function(itemstack, placer, pointed_thing)
+ itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
+ "default:emergent_jungle_sapling",
+ -- minp, maxp to be checked, relative to sapling pos
+ {x = -3, y = -5, z = -3},
+ {x = 3, y = 31, z = 3},
+ -- maximum interval of interior volume check
+ 4)
+
+ return itemstack
+ end,
+})
+
minetest.register_node("default:pine_tree", {
description = "Pine Tree",
minetest.log("action", "An acacia bush sapling grows into a bush at "..
minetest.pos_to_string(pos))
default.grow_acacia_bush(pos)
+ elseif node.name == "default:emergent_jungle_sapling" then
+ minetest.log("action", "An emergent jungle sapling grows into a tree at "..
+ minetest.pos_to_string(pos))
+ default.grow_new_emergent_jungle_tree(pos)
end
end
end
+-- New emergent jungle tree
+
+function default.grow_new_emergent_jungle_tree(pos)
+ local path = minetest.get_modpath("default") ..
+ "/schematics/emergent_jungle_tree_from_sapling.mts"
+ minetest.place_schematic({x = pos.x - 3, y = pos.y - 5, z = pos.z - 3},
+ path, "random", nil, false)
+end
+
+
-- New pine tree
function default.grow_new_pine_tree(pos)