MCPcopy Create free account
hub / github.com/Hypejet/Jet / loop

Method loop

server/src/main/java/net/hypejet/jet/server/tick/Ticker.java:98–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96 }
97
98 private void loop() {
99 long nextTickNanos = System.nanoTime();
100 while (this.running) {
101 // TODO: Run the other tick logic
102
103 // TODO: Split chunk batch handling to multiple threads
104 this.server.playerList().players().forEach(player -> player.chunkBatchHandler().tick());
105
106 while (true) {
107 Runnable task = this.tasks.poll();
108 if (task == null) break;
109 task.run();
110 }
111
112 nextTickNanos += this.tickNanos;
113 LockSupport.parkNanos(nextTickNanos - System.nanoTime());
114 }
115 }
116}

Callers

nothing calls this directly

Calls 6

forEachMethod · 0.80
playerListMethod · 0.80
tickMethod · 0.80
chunkBatchHandlerMethod · 0.80
playersMethod · 0.65
runMethod · 0.45

Tested by

no test coverage detected