Little more progress

Keep getting interrupted so not as much as I'd like :(
This commit is contained in:
Zach Brown
2019-12-11 18:03:31 -06:00
parent c9ef3d1cfc
commit dd751b9191
40 changed files with 263 additions and 617 deletions

View File

@@ -18,7 +18,7 @@ an invalid entity.
This should reduce log occurrences of dupe uuid messages.
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 03be77299b..e778c2e857 100644
index 4af5a230b..6371f2f5b 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -0,0 +0,0 @@ public class ChunkRegionLoader {
@@ -32,10 +32,10 @@ index 03be77299b..e778c2e857 100644
@@ -0,0 +0,0 @@ public class ChunkRegionLoader {
while (iterator1.hasNext()) {
Entity entity = (Entity) iterator1.next();
NBTTagCompound nbttagcompound3 = new NBTTagCompound();
NBTTagCompound nbttagcompound4 = new NBTTagCompound();
-
+ // Paper start
+ if ((int)Math.floor(entity.locX) >> 4 != chunk.getPos().x || (int)Math.floor(entity.locZ) >> 4 != chunk.getPos().z) {
+ if ((int) Math.floor(entity.locX()) >> 4 != chunk.getPos().x || (int) Math.floor(entity.locZ()) >> 4 != chunk.getPos().z) {
+ LogManager.getLogger().warn(entity + " is not in this chunk, skipping save. This a bug fix to a vanilla bug. Do not report this to PaperMC please.");
+ toUpdate.add(entity);
+ continue;
@@ -44,9 +44,9 @@ index 03be77299b..e778c2e857 100644
+ continue;
+ }
+ // Paper end
if (entity.d(nbttagcompound3)) {
if (entity.d(nbttagcompound4)) {
chunk.d(true);
nbttaglist2.add(nbttagcompound3);
nbttaglist2.add(nbttagcompound4);
}
}
}