Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 21:10:17 +01:00
Never remove players when unloading chunks. Fixes BUKKIT-3129
When unloading chunks we have a check to ensure we do not remove players from the world due to the issues this would cause. However, our check to see if the player is in this chunk is reversed and is in fact entirely wrong. Even if the player isn't currently in this chunk we do not want to remove them as that will still cause the same issues.
Dieser Commit ist enthalten in:
Ursprung
3a0c5aff0c
Commit
49da990ee3
@ -686,12 +686,10 @@ public class Chunk {
|
||||
java.util.Iterator<Object> iter = this.entitySlices[i].iterator();
|
||||
while (iter.hasNext()) {
|
||||
Entity entity = (Entity) iter.next();
|
||||
int cx = Location.locToBlock(entity.locX) >> 4;
|
||||
int cz = Location.locToBlock(entity.locZ) >> 4;
|
||||
|
||||
// Do not pass along players, as doing so can get them stuck outside of time.
|
||||
// (which for example disables inventory icon updates and prevents block breaking)
|
||||
if (entity instanceof EntityPlayer && (cx != this.x || cz != this.z)) {
|
||||
if (entity instanceof EntityPlayer) {
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren