reset tick rate when changing worlds in SP
This commit is contained in:
1 parent
30dd021703
commit
291268c14f
2 files changed
+19
No files matched your search
@@ -118,6 +118,7 @@ public class CarpetServer // static for now - easier to handle all around the co
|
||||
if (scriptServer != null) scriptServer.onClose();
|
||||
settingsManager.detachServer();
|
||||
LoggerRegistry.stopLoggers();
|
||||
TickSpeed.reset();
|
||||
extensions.forEach(e -> e.onServerClosed(server));
|
||||
minecraft_server = null;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,24 @@ public class TickSpeed
|
||||
}
|
||||
}
|
||||
|
||||
public static void reset()
|
||||
{
|
||||
tickrate = 20.0f;
|
||||
mspt = 50.0f;
|
||||
time_bias = 0;
|
||||
time_warp_start_time = 0;
|
||||
time_warp_scheduled_ticks = 0;
|
||||
time_advancerer = null;
|
||||
tick_warp_callback = null;
|
||||
tick_warp_sender = null;
|
||||
player_active_timeout = 0;
|
||||
process_entities = true;
|
||||
deepFreeze = false;
|
||||
is_paused = false;
|
||||
is_superHot = false;
|
||||
notifyTickrateListeners("carpet");
|
||||
}
|
||||
|
||||
public static void add_ticks_to_run_in_pause(int ticks)
|
||||
{
|
||||
player_active_timeout = PLAYER_GRACE+ticks;
|
||||
|
||||
Reference in new issue
Block a user