Fix distance map contains (#6530)
Dieser Commit ist enthalten in:
Ursprung
7d10cdea03
Commit
2cd4bcfba1
@ -6,7 +6,7 @@ Subject: [PATCH] Use distance map to optimise entity tracker
|
||||
Use the distance map to find candidate players for tracking.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 22c691f3bfbfc5f8e7420c14de36a353b31fc123..5f8399cc2ba5114d11298808528b18f044c650ce 100644
|
||||
index 22c691f3bfbfc5f8e7420c14de36a353b31fc123..136b832c1a04042457817b2bf2a4a5d057d1b6ca 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -63,6 +63,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket;
|
||||
@ -271,7 +271,7 @@ index 22c691f3bfbfc5f8e7420c14de36a353b31fc123..5f8399cc2ba5114d11298808528b18f0
|
||||
+ // for players that were removed
|
||||
+
|
||||
+ for (ServerPlayerConnection conn : this.seenBy.toArray(new ServerPlayerConnection[0])) { // avoid CME
|
||||
+ if (newTrackerCandidates == null || !newTrackerCandidates.contains(conn)) {
|
||||
+ if (newTrackerCandidates == null || !newTrackerCandidates.contains(conn.getPlayer())) {
|
||||
+ this.updatePlayer(conn.getPlayer());
|
||||
+ }
|
||||
+ }
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren