@@ -82,7 +82,7 @@ public void addPlayer(final ServerPlayer player) {
8282
8383 for (int i = 0 ; i < TOTAL_MAP_TYPES ; ++i ) {
8484 // use 0 for default, will be updated by tickPlayer
85- (newTrackers [i ] = new TrackedPlayer (player , MAP_TYPES [i ])).add (chunk .x , chunk .z , 0 );
85+ (newTrackers [i ] = new TrackedPlayer (player , MAP_TYPES [i ])).add (chunk .x () , chunk .z () , 0 );
8686 }
8787
8888 // update view distances
@@ -118,12 +118,12 @@ public void tickPlayer(final ServerPlayer player) {
118118
119119 final ChunkPos chunk = player .chunkPosition ();
120120
121- players [NearbyMapType .GENERAL .ordinal ()].update (chunk .x , chunk .z , GENERAL_AREA_VIEW_DISTANCE );
122- players [NearbyMapType .GENERAL_SMALL .ordinal ()].update (chunk .x , chunk .z , GENERAL_SMALL_VIEW_DISTANCE );
123- players [NearbyMapType .GENERAL_REALLY_SMALL .ordinal ()].update (chunk .x , chunk .z , GENERAL_REALLY_SMALL_VIEW_DISTANCE );
124- players [NearbyMapType .TICK_VIEW_DISTANCE .ordinal ()].update (chunk .x , chunk .z , PlatformHooks .get ().getTickViewDistance (player ));
125- players [NearbyMapType .VIEW_DISTANCE .ordinal ()].update (chunk .x , chunk .z , PlatformHooks .get ().getViewDistance (player ));
126- players [NearbyMapType .SPAWN_RANGE .ordinal ()].update (chunk .x , chunk .z , ChunkTickConstants .PLAYER_SPAWN_TRACK_RANGE ); // Moonrise - chunk tick iteration
121+ players [NearbyMapType .GENERAL .ordinal ()].update (chunk .x () , chunk .z () , GENERAL_AREA_VIEW_DISTANCE );
122+ players [NearbyMapType .GENERAL_SMALL .ordinal ()].update (chunk .x () , chunk .z () , GENERAL_SMALL_VIEW_DISTANCE );
123+ players [NearbyMapType .GENERAL_REALLY_SMALL .ordinal ()].update (chunk .x () , chunk .z () , GENERAL_REALLY_SMALL_VIEW_DISTANCE );
124+ players [NearbyMapType .TICK_VIEW_DISTANCE .ordinal ()].update (chunk .x () , chunk .z () , PlatformHooks .get ().getTickViewDistance (player ));
125+ players [NearbyMapType .VIEW_DISTANCE .ordinal ()].update (chunk .x () , chunk .z () , PlatformHooks .get ().getViewDistance (player ));
126+ players [NearbyMapType .SPAWN_RANGE .ordinal ()].update (chunk .x () , chunk .z () , ChunkTickConstants .PLAYER_SPAWN_TRACK_RANGE ); // Moonrise - chunk tick iteration
127127 }
128128
129129 public TrackedChunk getChunk (final ChunkPos pos ) {
@@ -255,7 +255,7 @@ protected void removeCallback(final ServerPlayer parameter, final int chunkX, fi
255255
256256 final TrackedChunk chunk = NearbyPlayers .this .byChunk .get (chunkKey );
257257 if (chunk == null ) {
258- throw new IllegalStateException ("Chunk should exist at " + new ChunkPos (chunkKey ));
258+ throw new IllegalStateException ("Chunk should exist at " + ChunkPos . unpack (chunkKey ));
259259 }
260260
261261 final NearbyMapType type = this .type ;
0 commit comments