mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-17 04:51:36 +01:00
SPIGOT-2891: Remove chunks if first check is false
Minecraft does double checking for synchronous generation, but since we generate chunks asynchronously we are required to check the first condition also in case the chunk was loaded between ticks. We leave the other logic to be cleaned up by the loops below.
This commit is contained in:
parent
bfbd868a37
commit
58bff62b2d
@ -19,7 +19,19 @@
|
||||
|
||||
public PlayerChunkMap(WorldServer worldserver) {
|
||||
this.world = worldserver;
|
||||
@@ -231,6 +236,16 @@
|
||||
@@ -169,7 +174,11 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
+ // CraftBukkit start - SPIGOT-2891: remove once chunk has been provided
|
||||
+ } else {
|
||||
+ iterator1.remove();
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,6 +240,16 @@
|
||||
return playerchunk;
|
||||
}
|
||||
|
||||
@ -36,7 +48,7 @@
|
||||
public void flagDirty(BlockPosition blockposition) {
|
||||
int i = blockposition.getX() >> 4;
|
||||
int j = blockposition.getZ() >> 4;
|
||||
@@ -249,12 +264,22 @@
|
||||
@@ -249,12 +268,22 @@
|
||||
entityplayer.d = entityplayer.locX;
|
||||
entityplayer.e = entityplayer.locZ;
|
||||
|
||||
@ -60,7 +72,7 @@
|
||||
this.managedPlayers.add(entityplayer);
|
||||
this.e();
|
||||
}
|
||||
@@ -298,11 +323,14 @@
|
||||
@@ -298,11 +327,14 @@
|
||||
int j1 = i - k;
|
||||
int k1 = j - l;
|
||||
|
||||
@ -76,7 +88,7 @@
|
||||
}
|
||||
|
||||
if (!this.a(l1 - j1, i2 - k1, i, j, i1)) {
|
||||
@@ -318,6 +346,13 @@
|
||||
@@ -318,6 +350,13 @@
|
||||
entityplayer.d = entityplayer.locX;
|
||||
entityplayer.e = entityplayer.locZ;
|
||||
this.e();
|
||||
@ -90,7 +102,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -402,4 +437,47 @@
|
||||
@@ -402,4 +441,47 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user