mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 12:31:05 +01:00
[mcl_portals] Generate target map chunks on portal creation
This commit is contained in:
parent
647a53c354
commit
06280e3bba
1 changed files with 5 additions and 0 deletions
|
@ -592,6 +592,11 @@ function mcl_portals.light_nether_portal(pos)
|
|||
local orientation = random(0, 1)
|
||||
for orientation_iteration = 1, 2 do
|
||||
if check_and_light_shape(pos, orientation) then
|
||||
minetest.after(0.2, function(pos) -- generate target map chunk
|
||||
local pos1 = add(mul(mcl_vars.pos_to_chunk(pos), mcl_vars.chunk_size_in_nodes), mcl_vars.central_chunk_offset_in_nodes)
|
||||
local pos2 = add(pos1, mcl_vars.chunk_size_in_nodes - 1)
|
||||
minetest.emerge_area(pos1, pos2)
|
||||
end, vector.new(pos))
|
||||
return true
|
||||
end
|
||||
orientation = 1 - orientation
|
||||
|
|
Loading…
Reference in a new issue