mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
migrate blocks interaction (scripting) to global chunks storage (WIP)
This commit is contained in:
parent
53cc8d3c7b
commit
e0b3425eff
16 changed files with 228 additions and 145 deletions
|
|
@ -1,12 +1,16 @@
|
|||
test.set_setting("chunks.load-distance", 2)
|
||||
test.set_setting("chunks.load-distance", 3)
|
||||
test.set_setting("chunks.load-speed", 16)
|
||||
|
||||
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 world.count_chunks() >= 9 end, 1000)
|
||||
print(world.count_chunks())
|
||||
assert(block.get(0, 0, 0) == block.index("core:obstacle"))
|
||||
|
||||
timeit(1000000, block.get, 0, 0, 0)
|
||||
timeit(1000000, block.get_slow, 0, 0, 0)
|
||||
|
||||
block.destruct(0, 0, 0, pid)
|
||||
assert(block.get(0, 0, 0) == 0)
|
||||
test.close_world(true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue