mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-07-12 17:32:19 -04:00
Avoid parsing mapgen 'chunksize' by hand
Some checks failed
luacheck / luacheck (push) Has been cancelled
Test / test (map[image:ghcr.io/luanti-org/luanti:master]) (push) Has been cancelled
Test / test (map[image:ghcr.io/minetest/minetest:5.10.0]) (push) Has been cancelled
Test / test (map[image:ghcr.io/minetest/minetest:5.9.0]) (push) Has been cancelled
Some checks failed
luacheck / luacheck (push) Has been cancelled
Test / test (map[image:ghcr.io/luanti-org/luanti:master]) (push) Has been cancelled
Test / test (map[image:ghcr.io/minetest/minetest:5.10.0]) (push) Has been cancelled
Test / test (map[image:ghcr.io/minetest/minetest:5.9.0]) (push) Has been cancelled
This commit is contained in:
parent
6ed522b5fc
commit
8fbfc14c3f
2 changed files with 9 additions and 11 deletions
|
@ -1860,7 +1860,13 @@ function default.register_decorations()
|
|||
-- Emergent jungle tree
|
||||
-- Due to 32 node height, altitude is limited and prescence depends on chunksize
|
||||
|
||||
local chunksize = tonumber(minetest.get_mapgen_setting("chunksize"))
|
||||
local chunksize
|
||||
if core.get_mapgen_chunksize then
|
||||
local v = core.get_mapgen_chunksize()
|
||||
chunksize = math.max(v.x, v.y, v.z)
|
||||
else
|
||||
chunksize = tonumber(core.get_mapgen_setting("chunksize"))
|
||||
end
|
||||
if chunksize >= 5 then
|
||||
minetest.register_decoration({
|
||||
name = "default:emergent_jungle_tree",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue