Allow multiple structures (of different type) in one chunk

This commit is contained in:
cora 2024-08-04 19:00:37 +02:00 committed by ryvnf
parent ecc5a866c6
commit deae34c102

View File

@ -305,10 +305,10 @@ end
mcl_mapgen_core.register_generator("structures",nil, function(minp, maxp, blockseed)
local gennotify = minetest.get_mapgen_object("gennotify")
local has = false
local block_pr = PcgRandom(blockseed + 42)
for _,struct in pairs(mcl_structures.registered_structures) do
if struct.deco_id then
local has = false
for _, pos in pairs(gennotify["decoration#"..struct.deco_id] or {}) do
local pr = PcgRandom(minetest.hash_node_position(pos) + 42)
local realpos = vector.offset(pos,0,1,0)