Adventure 4.9.1 (#6634)

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
This commit is contained in:
Kezz 2021-09-23 22:07:44 +01:00 committed by GitHub
parent 1707c10395
commit 397349e0aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 343 additions and 158 deletions

View file

@ -44,10 +44,10 @@ index 7cc882333b28fe79d3445c0b9d1bb5e71e2418eb..ecc65fe9783f0f369695edc1183f3d49
this.printSaveWarning = false;
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 05eb3dd86a8d24d7e8746cd18efe5e1415ad1a53..9d7b33c71525b11afa0c2f2371d2ff8fe656cf28 100644
index fcf7076c1df858d35d6b69995b7c4768233b8370..ea6cb4873e72cf6be81c1a6bf48e5932cc5684f1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -262,8 +262,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -263,8 +263,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public Chunk getChunkAt(int x, int z) {
@ -70,7 +70,7 @@ index 05eb3dd86a8d24d7e8746cd18efe5e1415ad1a53..9d7b33c71525b11afa0c2f2371d2ff8f
@Override
public Chunk getChunkAt(Block block) {
@@ -330,7 +343,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -331,7 +344,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
public boolean unloadChunkRequest(int x, int z) {
org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot
if (this.isChunkLoaded(x, z)) {
@ -79,7 +79,7 @@ index 05eb3dd86a8d24d7e8746cd18efe5e1415ad1a53..9d7b33c71525b11afa0c2f2371d2ff8f
}
return true;
@@ -407,9 +420,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -408,9 +421,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot
// Paper start - Optimize this method
ChunkPos chunkPos = new ChunkPos(x, z);
@ -93,7 +93,7 @@ index 05eb3dd86a8d24d7e8746cd18efe5e1415ad1a53..9d7b33c71525b11afa0c2f2371d2ff8f
if (immediate == null) {
immediate = world.getChunkSource().chunkMap.getUnloadingChunk(x, z);
}
@@ -417,7 +433,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -418,7 +434,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
if (!(immediate instanceof ImposterProtoChunk) && !(immediate instanceof net.minecraft.world.level.chunk.LevelChunk)) {
return false; // not full status
}
@ -102,7 +102,7 @@ index 05eb3dd86a8d24d7e8746cd18efe5e1415ad1a53..9d7b33c71525b11afa0c2f2371d2ff8f
world.getChunk(x, z); // make sure we're at ticket level 32 or lower
return true;
}
@@ -443,7 +459,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -444,7 +460,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
// we do this so we do not re-read the chunk data on disk
}
@ -111,7 +111,7 @@ index 05eb3dd86a8d24d7e8746cd18efe5e1415ad1a53..9d7b33c71525b11afa0c2f2371d2ff8f
world.getChunkSource().getChunk(x, z, ChunkStatus.FULL, true);
return true;
// Paper end
@@ -1888,6 +1904,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1889,6 +1905,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return this.world.getChunkSource().getChunkAtAsynchronously(x, z, gen, urgent).thenComposeAsync((either) -> {
net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk) either.left().orElse(null);