Commit 8e769a1 1 parent a3a7339 commit 8e769a1 Copy full SHA for 8e769a1
File tree 1 file changed +13
-0
lines changed
src/main/java/io/github/opencubicchunks/cubicchunks/core/server
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 65
65
import java .util .Iterator ;
66
66
import java .util .List ;
67
67
import java .util .Optional ;
68
+ import java .util .Random ;
68
69
import java .util .Set ;
70
+ import java .util .function .BooleanSupplier ;
69
71
import java .util .function .Consumer ;
70
72
71
73
import javax .annotation .Detainted ;
@@ -225,6 +227,17 @@ public boolean saveChunks(boolean alwaysTrue) {
225
227
226
228
@ Override
227
229
public boolean tick () {
230
+ // NOTE: the return value is completely ignored
231
+ profiler .startSection ("providerTick" );
232
+ long i = System .currentTimeMillis ();
233
+ Random rand = this .world .rand ;
234
+ PlayerCubeMap playerCubeMap = ((PlayerCubeMap ) this .world .getPlayerChunkMap ());
235
+ Iterator <Cube > watchersIterator = playerCubeMap .getCubeIterator ();
236
+ BooleanSupplier tickFaster = () -> System .currentTimeMillis () - i > 40 ;
237
+ while (watchersIterator .hasNext ()) {
238
+ watchersIterator .next ().tickCubeServer (tickFaster , rand );
239
+ }
240
+ profiler .endSection ();
228
241
return false ;
229
242
}
230
243
You can’t perform that action at this time.
0 commit comments