advanced chunks loading test

This commit is contained in:
MihailRis 2024-12-17 21:18:05 +03:00
parent b1fc666448
commit 09e641fd91

View File

@ -1,13 +1,18 @@
test.set_setting("chunks.load-distance", 3)
test.set_setting("chunks.load-speed", 16)
test.set_setting("chunks.load-speed", 32)
test.reconfig_packs({"base"}, {})
test.new_world("demo", "2019", "core:default")
local pid = player.create("Xerxes")
assert(player.get_name(pid) == "Xerxes")
test.sleep_until(function() return block.get(0, 0, 0) >= 0 end, 1000)
print(world.count_chunks())
block.destruct(0, 0, 0, pid)
assert(block.get(0, 0, 0) == 0)
for i=1,100 do
if i % 10 == 0 then
print(tostring(i).." % done")
print("chunks loaded", world.count_chunks())
end
player.set_pos(pid, math.random() * 100 - 50, 100, math.random() * 100 - 50)
test.tick()
end
test.close_world(true)