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
|
set {_n} to now
|
||||||
|
|
||||||
#requires GovindaSK
|
#requires GovindaSK
|
||||||
|
{-govindask} is set:
|
||||||
if {-govindask} is set:
|
parse if plugin "GovindaSK" is enabled:
|
||||||
if {_saving} is true:
|
if {_saving} is true:
|
||||||
unload all chunks in {_world} with saving
|
unload all chunks in {_world} with saving
|
||||||
else:
|
else:
|
||||||
unload all chunks in {_world} without saving
|
unload all chunks in {_world} without saving
|
||||||
#if GovindaSK is not found, fall back to skript-reflect way of unloading chunks
|
#if GovindaSK is not found, fall back to skript-reflect way of unloading chunks
|
||||||
else:
|
else:
|
||||||
loop ...{_world}.getLoadedChunks():
|
loop ...{_world}.getLoadedChunks():
|
||||||
@ -749,6 +749,11 @@ function initWorlds():
|
|||||||
|
|
||||||
else if (loop-value parsed as a world) is not a world:
|
else if (loop-value parsed as a world) is not a world:
|
||||||
loadWorld(loop-value)
|
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():
|
function deleteClones():
|
||||||
{fastworldresetclone::*} is set
|
{fastworldresetclone::*} is set
|
||||||
set {_worlddir} to {-fwrcache::worlddir}
|
set {_worlddir} to {-fwrcache::worlddir}
|
||||||
|
Loading…
Reference in New Issue
Block a user