Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
312281ea PR-742: Make World implement Keyed

CraftBukkit Changes:
2ac7fa7a SPIGOT-7014: getLootTable API should not persistently update loot table
7fdd7941 PR-1046: Make World implement Keyed
7bc728a6 PR-1045: Revert changes to persistence required checks

Spigot Changes:
b6d12d17 Rebuild patches
This commit is contained in:
Nassim Jahnke 2022-05-09 11:03:07 +02:00 committed by GitHub
parent 268476bba3
commit 18f0f8d1ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
211 changed files with 282 additions and 359 deletions

View file

@ -44,10 +44,10 @@ index d4d8eee914f71d9a33feda82ef54cb0c40b0e60c..28a04d21801a9bb1e4311e6da28eae26
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 249befd851798012e390017b90cd234a17d71718..62078ee1996c671639d00ddce4dabb7238a672b7 100644
index 4eb2ef0e5e8f7f1962ef9e3020daa77b7be25309..d49a8e22dcee95a6e8a6a7fe45e46feae414515d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -275,8 +275,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -276,8 +276,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public Chunk getChunkAt(int x, int z) {
@ -70,7 +70,7 @@ index 249befd851798012e390017b90cd234a17d71718..62078ee1996c671639d00ddce4dabb72
@Override
public Chunk getChunkAt(Block block) {
@@ -343,7 +356,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -344,7 +357,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 249befd851798012e390017b90cd234a17d71718..62078ee1996c671639d00ddce4dabb72
}
return true;
@@ -421,9 +434,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -422,9 +435,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 249befd851798012e390017b90cd234a17d71718..62078ee1996c671639d00ddce4dabb72
if (immediate == null) {
immediate = world.getChunkSource().chunkMap.getUnloadingChunk(x, z);
}
@@ -431,7 +447,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -432,7 +448,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 249befd851798012e390017b90cd234a17d71718..62078ee1996c671639d00ddce4dabb72
world.getChunk(x, z); // make sure we're at ticket level 32 or lower
return true;
}
@@ -457,7 +473,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -458,7 +474,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 249befd851798012e390017b90cd234a17d71718..62078ee1996c671639d00ddce4dabb72
world.getChunkSource().getChunk(x, z, ChunkStatus.FULL, true);
return true;
// Paper end
@@ -1972,6 +1988,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1978,6 +1994,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);