summaryrefslogtreecommitdiffstats
path: root/nms-patches/ChunkRegionLoader.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/ChunkRegionLoader.patch')
-rw-r--r--nms-patches/ChunkRegionLoader.patch30
1 files changed, 16 insertions, 14 deletions
diff --git a/nms-patches/ChunkRegionLoader.patch b/nms-patches/ChunkRegionLoader.patch
index a2335fa2..fb39a6e0 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
-@@ -29,25 +29,55 @@
+@@ -29,19 +29,49 @@
this.e = dataconvertermanager;
}
@@ -38,9 +38,9 @@
NBTTagCompound nbttagcompound = (NBTTagCompound) this.b.get(chunkcoordintpair);
if (nbttagcompound == null) {
-- DataInputStream datainputstream = RegionFileCache.c(this.d, i, j);
+- DataInputStream datainputstream = RegionFileCache.d(this.d, i, j);
+ // CraftBukkit start
-+ nbttagcompound = RegionFileCache.c(this.d, i, j);
++ nbttagcompound = RegionFileCache.d(this.d, i, j);
- if (datainputstream == null) {
+ if (nbttagcompound == null) {
@@ -53,14 +53,16 @@
}
return this.a(world, i, j, nbttagcompound);
+@@ -55,7 +85,7 @@
}
+ @Nullable
- protected Chunk a(World world, int i, int j, NBTTagCompound nbttagcompound) {
+ protected Object[] a(World world, int i, int j, NBTTagCompound nbttagcompound) { // CraftBukkit - return Chunk -> Object[]
if (!nbttagcompound.hasKeyOfType("Level", 10)) {
ChunkRegionLoader.a.error("Chunk file at {},{} is missing level data, skipping", new Object[] { Integer.valueOf(i), Integer.valueOf(j)});
return null;
-@@ -64,10 +94,28 @@
+@@ -72,10 +102,28 @@
ChunkRegionLoader.a.error("Chunk file at {},{} is in the wrong location; relocating. (Expected {}, {}, got {}, {})", new Object[] { Integer.valueOf(i), Integer.valueOf(j), Integer.valueOf(i), Integer.valueOf(j), Integer.valueOf(chunk.locX), Integer.valueOf(chunk.locZ)});
nbttagcompound1.setInt("xPos", i);
nbttagcompound1.setInt("zPos", j);
@@ -90,7 +92,7 @@
}
}
}
-@@ -98,20 +146,27 @@
+@@ -106,20 +154,27 @@
}
public boolean c() {
@@ -121,13 +123,13 @@
if (nbttagcompound != null) {
try {
-@@ -131,10 +186,14 @@
+@@ -139,10 +194,14 @@
}
private void b(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) throws IOException {
-- DataOutputStream dataoutputstream = RegionFileCache.d(this.d, chunkcoordintpair.x, chunkcoordintpair.z);
+- DataOutputStream dataoutputstream = RegionFileCache.e(this.d, chunkcoordintpair.x, chunkcoordintpair.z);
+ // CraftBukkit start
-+ RegionFileCache.d(this.d, chunkcoordintpair.x, chunkcoordintpair.z, nbttagcompound);
++ RegionFileCache.e(this.d, chunkcoordintpair.x, chunkcoordintpair.z, nbttagcompound);
+ /*
NBTCompressedStreamTools.a(nbttagcompound, (DataOutput) dataoutputstream);
@@ -137,7 +139,7 @@
}
public void b(World world, Chunk chunk) throws IOException {}
-@@ -149,6 +208,7 @@
+@@ -157,6 +216,7 @@
if (this.c()) {
continue;
}
@@ -145,7 +147,7 @@
}
} finally {
this.f = false;
-@@ -326,6 +386,13 @@
+@@ -334,6 +394,13 @@
chunk.a(nbttagcompound.getByteArray("Biomes"));
}
@@ -158,8 +160,8 @@
+
NBTTagList nbttaglist1 = nbttagcompound.getList("Entities", 10);
- if (nbttaglist1 != null) {
-@@ -369,7 +436,7 @@
+ for (int l = 0; l < nbttaglist1.size(); ++l) {
+@@ -371,7 +438,7 @@
}
}
@@ -168,7 +170,7 @@
}
@Nullable
-@@ -397,14 +464,20 @@
+@@ -399,14 +466,20 @@
}
@Nullable
@@ -190,7 +192,7 @@
return null;
} else {
if (nbttagcompound.hasKeyOfType("Passengers", 9)) {
-@@ -433,8 +506,14 @@
+@@ -435,8 +508,14 @@
}
}