chore: field reordering

(cherry picked from commit 2b0737615f8171a0172ba902786da0542f962d78)
This commit is contained in:
mworzala 2024-01-15 22:06:38 -05:00 committed by Matt Worzala
parent 4e33a5e6d8
commit a032bc32a7
1 changed files with 3 additions and 4 deletions

View File

@ -10,6 +10,9 @@ import java.util.concurrent.locks.LockSupport;
public final class TickSchedulerThread extends MinestomThread {
private final ServerProcess serverProcess;
private final long startTickNs = System.nanoTime();
private long tick = 1;
public TickSchedulerThread(ServerProcess serverProcess) {
super(MinecraftServer.THREAD_NAME_TICK_SCHEDULER);
this.serverProcess = serverProcess;
@ -29,10 +32,6 @@ public final class TickSchedulerThread extends MinestomThread {
}
}
private final long startTickNs = System.nanoTime();
private long tick = 1;
private void fixTickRate(long tickNs) {
long nextTickNs = startTickNs + (tickNs * tick);
if (System.nanoTime() < nextTickNs) {