retire static TickSpeed. Use Server and Client synchronization agents.

This commit is contained in:
gnembon committed 2023-05-17 21:20:00 +02:00
1 parent d0a7967218
commit c6f52b3293
28 files changed
+511 -419

No files matched your search

+2 -6
View File
@@ -15,14 +15,13 @@ import carpet.commands.PerimeterInfoCommand;
import carpet.commands.PlayerCommand;
import carpet.commands.ProfileCommand;
import carpet.fakes.MinecraftServerInterface;
import carpet.helpers.TickRateManager;
import carpet.helpers.ServerTickRateManager;
import carpet.script.ScriptCommand;
import carpet.commands.SpawnCommand;
import carpet.commands.TestCommand;
import carpet.commands.TickCommand;
import carpet.network.ServerNetworkHandler;
import carpet.helpers.HopperCounter;
import carpet.helpers.TickSpeed;
import carpet.logging.LoggerRegistry;
import carpet.script.CarpetScriptServer;
import carpet.api.settings.CarpetRule;
@@ -129,7 +128,7 @@ public class CarpetServer // static for now - easier to handle all around the co
public static void tick(MinecraftServer server)
{
TickRateManager trm = ((MinecraftServerInterface)server).getTickRateManager();
ServerTickRateManager trm = ((MinecraftServerInterface)server).getTickRateManager();
trm.tick();
HUDController.update_hud(server, null);
if (scriptServer != null) scriptServer.tick();
@@ -229,9 +228,6 @@ public class CarpetServer // static for now - easier to handle all around the co
extensions.forEach(e -> e.onServerClosed(server));
minecraft_server = null;
}
// this for whatever reason gets called multiple times even when joining;
TickSpeed.resetClient();
}
public static void onServerDoneClosing(MinecraftServer server)
{