summaryrefslogtreecommitdiffstats
path: root/nms-patches/ChunkProviderServer.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/ChunkProviderServer.patch')
-rw-r--r--nms-patches/ChunkProviderServer.patch18
1 files changed, 11 insertions, 7 deletions
diff --git a/nms-patches/ChunkProviderServer.patch b/nms-patches/ChunkProviderServer.patch
index 59932d51..847c028e 100644
--- a/nms-patches/ChunkProviderServer.patch
+++ b/nms-patches/ChunkProviderServer.patch
@@ -103,7 +103,7 @@
return chunk;
}
-@@ -61,20 +91,67 @@
+@@ -61,20 +91,71 @@
Chunk chunk = this.getLoadedChunkAt(i, j);
if (chunk == null) {
@@ -137,6 +137,10 @@
+ }
+
+ public Chunk getChunkAt(int i, int j, Runnable runnable) {
++ return getChunkAt(i, j, runnable, true);
++ }
++
++ public Chunk getChunkAt(int i, int j, Runnable runnable, boolean generate) {
+ unloadQueue.remove(i, j);
+ Chunk chunk = chunks.get(LongHash.toLong(i, j));
+ ChunkRegionLoader loader = null;
@@ -153,7 +157,7 @@
+ } else {
+ chunk = ChunkIOExecutor.syncChunkLoad(world, loader, this, i, j);
+ }
-+ } else if (chunk == null) {
++ } else if (chunk == null && generate) {
+ chunk = originalGetChunkAt(i, j);
+ }
+
@@ -173,7 +177,7 @@
if (chunk == null) {
long k = ChunkCoordIntPair.a(i, j);
-@@ -92,11 +169,38 @@
+@@ -92,11 +173,38 @@
crashreportsystemdetails.a("Generator", (Object) this.chunkGenerator);
throw new ReportedException(crashreport);
}
@@ -214,7 +218,7 @@
chunk.loadNearby(this, this.chunkGenerator);
}
-@@ -142,10 +246,12 @@
+@@ -142,10 +250,12 @@
public boolean a(boolean flag) {
int i = 0;
@@ -230,7 +234,7 @@
if (flag) {
this.saveChunkNOP(chunk);
-@@ -170,22 +276,43 @@
+@@ -170,22 +280,43 @@
public boolean unloadChunks() {
if (!this.world.savingDisabled) {
@@ -281,7 +285,7 @@
this.chunkLoader.a();
}
-@@ -198,7 +325,8 @@
+@@ -198,7 +329,8 @@
}
public String getName() {
@@ -291,7 +295,7 @@
}
public List<BiomeBase.BiomeMeta> a(EnumCreatureType enumcreaturetype, BlockPosition blockposition) {
-@@ -210,10 +338,11 @@
+@@ -210,10 +342,11 @@
}
public int g() {