Let invalid positioned entities clean up previous chunk by the chunkCheck
I had did a few of the operations myself, which would have broken chunkCheck from doing it itself, which would leave some state left in the original chunk and thats not good....
This commit is contained in:
@@ -80,7 +80,7 @@ index 4af5a230b..83bcef7e6 100644
|
||||
public static ChunkStatus.Type a(@Nullable NBTTagCompound nbttagcompound) {
|
||||
if (nbttagcompound != null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 6ce7f77a5..1adabb751 100644
|
||||
index 6ce7f77a5..87762b172 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -0,0 +0,0 @@ public class WorldServer extends World {
|
||||
@@ -98,9 +98,6 @@ index 6ce7f77a5..1adabb751 100644
|
||||
+ // Paper start - move out entities that shouldn't be in this chunk before it unloads
|
||||
+ if (!entity.dead && (int) Math.floor(entity.locX()) >> 4 != chunk.getPos().x || (int) Math.floor(entity.locZ()) >> 4 != chunk.getPos().z) {
|
||||
+ toMoveChunks.add(entity);
|
||||
+ entity.inChunk = false;
|
||||
+ entity.entitySlice = null;
|
||||
+ iterator.remove();
|
||||
+ continue;
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
Reference in New Issue
Block a user