2018-09-01 06:56:57 +08:00
|
|
|
From 1285cf28b6ff0e40cd76bc64122577d31fcbbcc5 Mon Sep 17 00:00:00 2001
|
2018-07-15 09:53:17 +08:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Tue, 5 Apr 2016 19:42:22 -0400
|
|
|
|
Subject: [PATCH] Don't spam reload spawn chunks in nether/end
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
2018-09-01 06:56:57 +08:00
|
|
|
index 4ea7bc53e6..f5741b2b36 100644
|
2018-07-15 09:53:17 +08:00
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
2018-08-27 02:11:49 +08:00
|
|
|
@@ -2864,6 +2864,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
2018-07-15 09:53:17 +08:00
|
|
|
return this.K;
|
|
|
|
}
|
|
|
|
|
2018-08-27 02:11:49 +08:00
|
|
|
+ public boolean isSpawnChunk(int i, int j) { return e(i, j); } // Paper - OBFHELPER
|
|
|
|
public boolean e(int i, int j) {
|
2018-07-15 09:53:17 +08:00
|
|
|
BlockPosition blockposition = this.getSpawn();
|
|
|
|
int k = i * 16 + 8 - blockposition.getX();
|
2018-08-27 02:11:49 +08:00
|
|
|
@@ -2880,6 +2881,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
|
|
|
return (LongSet) (forcedchunk != null ? LongSets.unmodifiable(forcedchunk.a()) : LongSets.EMPTY_SET);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ public boolean isForcedChunk(int i, int j) { return f(i, j); } // Paper - OBFHELPER
|
|
|
|
public boolean f(int i, int j) {
|
|
|
|
ForcedChunk forcedchunk = (ForcedChunk) this.a(this.worldProvider.getDimensionManager(), ForcedChunk::new, "chunks");
|
|
|
|
|
2018-07-15 09:53:17 +08:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
|
2018-09-01 06:56:57 +08:00
|
|
|
index 517b1e7124..0e654ebf70 100644
|
2018-07-15 09:53:17 +08:00
|
|
|
--- a/src/main/java/net/minecraft/server/WorldProvider.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
|
2018-09-01 06:56:57 +08:00
|
|
|
@@ -72,7 +72,7 @@ public abstract class WorldProvider {
|
|
|
|
}
|
2018-07-15 09:53:17 +08:00
|
|
|
|
|
|
|
public boolean a(int i, int j) {
|
2018-08-27 02:11:49 +08:00
|
|
|
- return !this.b.f(i, j);
|
|
|
|
+ return !this.b.isSpawnChunk(i, j) && !this.b.isForcedChunk(i, j); // Paper - Use spawn chunks check for all worlds
|
2018-07-15 09:53:17 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
protected abstract void m();
|
|
|
|
--
|
|
|
|
2.18.0
|
|
|
|
|