mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-30 12:11:35 +01:00
Remove wrong update call in distance map add method
This commit is contained in:
parent
0ca006fedf
commit
cb04758f6b
@ -44,9 +44,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
public final CallbackExecutor callbackExecutor = new CallbackExecutor();
|
public final CallbackExecutor callbackExecutor = new CallbackExecutor();
|
||||||
public static final class CallbackExecutor implements java.util.concurrent.Executor, Runnable {
|
public static final class CallbackExecutor implements java.util.concurrent.Executor, Runnable {
|
||||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE);
|
// Paper end - use distance map to optimise entity tracker
|
||||||
this.playerChunkTickRangeMap.add(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE);
|
// Note: players need to be explicitly added to distance maps before they can be updated
|
||||||
// Paper end - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
this.playerChunkTickRangeMap.add(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); // Paper - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
||||||
+ this.playerGeneralAreaMap.add(player, chunkX, chunkZ, GENERAL_AREA_MAP_SQUARE_RADIUS); // Paper - optimise checkDespawn
|
+ this.playerGeneralAreaMap.add(player, chunkX, chunkZ, GENERAL_AREA_MAP_SQUARE_RADIUS); // Paper - optimise checkDespawn
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,10 +60,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
int chunkX = MCUtil.getChunkCoordinate(player.getX());
|
int chunkX = MCUtil.getChunkCoordinate(player.getX());
|
||||||
int chunkZ = MCUtil.getChunkCoordinate(player.getZ());
|
int chunkZ = MCUtil.getChunkCoordinate(player.getZ());
|
||||||
// Note: players need to be explicitly added to distance maps before they can be updated
|
// Note: players need to be explicitly added to distance maps before they can be updated
|
||||||
+ // Paper start - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
+ this.playerChunkTickRangeMap.add(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); // Paper - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
||||||
+ this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE);
|
|
||||||
+ this.playerChunkTickRangeMap.add(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE);
|
|
||||||
+ // Paper end - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void removePlayerFromDistanceMaps(ServerPlayer player) {
|
void removePlayerFromDistanceMaps(ServerPlayer player) {
|
||||||
|
@ -51,9 +51,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+ // Paper end - use distance map to optimise entity tracker
|
+ // Paper end - use distance map to optimise entity tracker
|
||||||
// Note: players need to be explicitly added to distance maps before they can be updated
|
// Note: players need to be explicitly added to distance maps before they can be updated
|
||||||
// Paper start - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
this.playerChunkTickRangeMap.add(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); // Paper - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
||||||
this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE);
|
|
||||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void removePlayerFromDistanceMaps(ServerPlayer player) {
|
void removePlayerFromDistanceMaps(ServerPlayer player) {
|
||||||
|
Loading…
Reference in New Issue
Block a user