1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-29 13:20:25 +02:00

Rainforest: Add emergent jungle tree and sapling

Height 20 to 32 nodes.
Dependent on chunksize >= 5.
Base limited to maximum altitude y = 32.
Craft sapling from 9 jungle saplings.
This commit is contained in:
paramat
2017-05-10 08:23:26 +01:00
parent 495fa32873
commit b90aabec80
8 changed files with 98 additions and 0 deletions

View File

@ -80,6 +80,7 @@ default:jungletree
default:junglewood
default:jungleleaves
default:junglesapling
default:emergent_jungle_sapling
default:pine_tree
default:pine_wood
@ -775,6 +776,41 @@ minetest.register_node("default:junglesapling", {
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",