diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index cf9ccfb9e..3655be7eb 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -3974,14 +3974,18 @@ if mg_name ~= "singlenode" then mcl_mapgen_core.register_generator("chorus_grow", nil, function(minp, maxp, blockseed) local gennotify = minetest.get_mapgen_object("gennotify") --local poslist = {} + local pr = PseudoRandom(blockseed + 14) for _, pos in ipairs(gennotify["decoration#"..deco_id_chorus_plant] or {}) do - local realpos = { x = pos.x, y = pos.y + 1, z = pos.z } - local node = minetest.get_node(realpos) - if node and node.name == "mcl_end:chorus_flower" then - mcl_end.grow_chorus_plant(realpos, node, PseudoRandom(blockseed + 14)) + local x, y, z = pos.x, pos.y, pos.z + if x < -2 or x > 2 or z < -2 or z > 2 then + local realpos = { x = x, y = y + 1, z = z } + local node = minetest.get_node(realpos) + if node and node.name == "mcl_end:chorus_flower" then + mcl_end.grow_chorus_plant(realpos, node, pr) + end end end - end, 999999999) + end) end end