mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add core.get_mapgen_chunksize() (#16289)
This commit is contained in:
parent
fcbf05fc30
commit
fd0ca20ce9
4 changed files with 30 additions and 3 deletions
|
@ -29,6 +29,6 @@ if core.ipc_cas("unittests:mg_once", nil, true) then
|
|||
end
|
||||
|
||||
core.register_on_generated(function(vm, pos1, pos2, blockseed)
|
||||
local n = tonumber(core.get_mapgen_setting("chunksize")) * 16 - 1
|
||||
assert(pos2:subtract(pos1) == vector.new(n, n, n))
|
||||
local cs = core.get_mapgen_chunksize()
|
||||
assert(pos2:subtract(pos1) == cs:multiply(core.MAP_BLOCKSIZE):subtract(1))
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue