Fix failed reset with a delay
This commit is contained in:
parent
54be2b1c74
commit
1fc1bd59e9
@ -74,12 +74,12 @@ function unloadChunks(world: world, saving: boolean) :: boolean:
|
||||
set {_n} to now
|
||||
|
||||
#requires GovindaSK
|
||||
|
||||
if {-govindask} is set:
|
||||
if {_saving} is true:
|
||||
unload all chunks in {_world} with saving
|
||||
else:
|
||||
unload all chunks in {_world} without saving
|
||||
{-govindask} is set:
|
||||
parse if plugin "GovindaSK" is enabled:
|
||||
if {_saving} is true:
|
||||
unload all chunks in {_world} with saving
|
||||
else:
|
||||
unload all chunks in {_world} without saving
|
||||
#if GovindaSK is not found, fall back to skript-reflect way of unloading chunks
|
||||
else:
|
||||
loop ...{_world}.getLoadedChunks():
|
||||
@ -749,6 +749,11 @@ function initWorlds():
|
||||
|
||||
else if (loop-value parsed as a world) is not a world:
|
||||
loadWorld(loop-value)
|
||||
#needed because in rare cases it starts to error if there is no delay ?
|
||||
#which sometimes results in empty chunks.
|
||||
#you'll have to design your code to support worlds that may not be loaded
|
||||
#do not save world object references, no location variables. (save them as text that you parse later)
|
||||
wait a tick
|
||||
function deleteClones():
|
||||
{fastworldresetclone::*} is set
|
||||
set {_worlddir} to {-fwrcache::worlddir}
|
||||
|
Loading…
Reference in New Issue
Block a user