diff options
Diffstat (limited to 'nms-patches/ChunkRegionLoader.patch')
-rw-r--r-- | nms-patches/ChunkRegionLoader.patch | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/nms-patches/ChunkRegionLoader.patch b/nms-patches/ChunkRegionLoader.patch index 44998f47..309445cd 100644 --- a/nms-patches/ChunkRegionLoader.patch +++ b/nms-patches/ChunkRegionLoader.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/ChunkRegionLoader.java +++ b/net/minecraft/server/ChunkRegionLoader.java -@@ -28,7 +28,35 @@ +@@ -29,8 +29,36 @@ this.e = dataconvertermanager; } @@ -19,6 +19,7 @@ + // CraftBukkit end + + // CraftBukkit start - Add async variant, provide compatibility + @Nullable public Chunk a(World world, int i, int j) throws IOException { + Object[] data = loadChunk(world, i, j); + if (data != null) { @@ -36,7 +37,7 @@ ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j); NBTTagCompound nbttagcompound = (NBTTagCompound) this.b.get(chunkcoordintpair); -@@ -45,7 +73,7 @@ +@@ -47,7 +75,7 @@ return this.a(world, i, j, nbttagcompound); } @@ -45,7 +46,7 @@ if (!nbttagcompound.hasKeyOfType("Level", 10)) { ChunkRegionLoader.a.error("Chunk file at " + i + "," + j + " is missing level data, skipping"); return null; -@@ -62,10 +90,28 @@ +@@ -64,10 +92,28 @@ ChunkRegionLoader.a.error("Chunk file at " + i + "," + j + " is in the wrong location; relocating. (Expected " + i + ", " + j + ", got " + chunk.locX + ", " + chunk.locZ + ")"); nbttagcompound1.setInt("xPos", i); nbttagcompound1.setInt("zPos", j); @@ -75,7 +76,7 @@ } } } -@@ -295,6 +341,13 @@ +@@ -296,6 +342,13 @@ chunk.a(nbttagcompound.getByteArray("Biomes")); } @@ -89,7 +90,7 @@ NBTTagList nbttaglist1 = nbttagcompound.getList("Entities", 10); if (nbttaglist1 != null) { -@@ -338,7 +391,7 @@ +@@ -339,7 +392,7 @@ } } @@ -97,8 +98,8 @@ + // return chunk; // CraftBukkit } - public static Entity a(NBTTagCompound nbttagcompound, World world, Chunk chunk) { -@@ -399,8 +452,14 @@ + @Nullable +@@ -403,8 +456,14 @@ } } @@ -111,6 +112,6 @@ + public static void a(Entity entity, World world, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) { + if (world.addEntity(entity, reason) && entity.isVehicle()) { + // CraftBukkit end - Iterator iterator = entity.bu().iterator(); + Iterator iterator = entity.bv().iterator(); while (iterator.hasNext()) { |