Updated Upstream (Bukkit/CraftBukkit) (#7323)

This commit is contained in:
Jake Potrebic 2022-01-12 13:39:20 -08:00 committed by GitHub
parent ebaca20edd
commit 0c64d401aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
83 changed files with 238 additions and 238 deletions

View file

@ -44,10 +44,10 @@ index 52fabc8cd1b76a825a13d39f38ca982e252cb39b..54598af96488c47b613de8eb8eb0bf31
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 706d5718997181279f7ec715526b4d8f2b6162a2..c11bdc266434aa9d90e5ab25e185dc1a1ba57d9b 100644
index 0ef9fc9cecdefcec3369c45643e474c16a588cea..bcb3a7e64f317732c8c758d4e743d84233bdafa6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -266,8 +266,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -268,8 +268,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public Chunk getChunkAt(int x, int z) {
@ -70,7 +70,7 @@ index 706d5718997181279f7ec715526b4d8f2b6162a2..c11bdc266434aa9d90e5ab25e185dc1a
@Override
public Chunk getChunkAt(Block block) {
@@ -334,7 +347,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -336,7 +349,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 706d5718997181279f7ec715526b4d8f2b6162a2..c11bdc266434aa9d90e5ab25e185dc1a
}
return true;
@@ -412,9 +425,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -414,9 +427,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 706d5718997181279f7ec715526b4d8f2b6162a2..c11bdc266434aa9d90e5ab25e185dc1a
if (immediate == null) {
immediate = world.getChunkSource().chunkMap.getUnloadingChunk(x, z);
}
@@ -422,7 +438,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -424,7 +440,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 706d5718997181279f7ec715526b4d8f2b6162a2..c11bdc266434aa9d90e5ab25e185dc1a
world.getChunk(x, z); // make sure we're at ticket level 32 or lower
return true;
}
@@ -448,7 +464,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -450,7 +466,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 706d5718997181279f7ec715526b4d8f2b6162a2..c11bdc266434aa9d90e5ab25e185dc1a
world.getChunkSource().getChunk(x, z, ChunkStatus.FULL, true);
return true;
// Paper end
@@ -1917,6 +1933,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1935,6 +1951,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);