moar client-server tick speed separation

This commit is contained in:
gnembon committed 2023-05-16 10:35:40 +02:00
1 parent e0a3060339
commit df786605c2
23 files changed
+166 -148

No files matched your search

@@ -1,9 +1,10 @@
package carpet.commands;
import carpet.CarpetSettings;
import carpet.fakes.MinecraftServerInterface;
import carpet.fakes.SpawnGroupInterface;
import carpet.helpers.HopperCounter;
import carpet.helpers.TickSpeed;
import carpet.helpers.TickRateManager;
import carpet.utils.CommandHelper;
import carpet.utils.Messenger;
import carpet.utils.SpawnReporter;
@@ -198,7 +199,8 @@ public class SpawnCommand
// tick warp 0
TickSpeed.tickrate_advance(null, 0, null, null);
TickRateManager trm = ((MinecraftServerInterface)source.getServer()).getTickRateManager();
trm.tickrate_advance(null, 0, null, null);
// tick warp given player
CommandSourceStack csource = null;
ServerPlayer player = null;
@@ -210,7 +212,7 @@ public class SpawnCommand
catch (CommandSyntaxException ignored)
{
}
TickSpeed.tickrate_advance(player, ticks, null, csource);
trm.tickrate_advance(player, ticks, null, csource);
Messenger.m(source, String.format("gi Started spawn test for %d ticks", ticks));
return 1;
}