Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6457)

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:
c9a46ebf #653: Add World#spawn with randomizeData parameter
e49c2e3a Damageable should extend ItemMeta
01ff04f4 SPIGOT-5880, SPIGOT-5567: New ChunkGenerator API
ca5b4b1a SPIGOT-6697: Deprecate generateTree with BlockChangeDelegate as it does not handle tiles

CraftBukkit Changes:
7c8bbcbe SPIGOT-6716: Preserve the order of stored enchantments of enchanted books.
18027d02 #914: Add World#spawn with randomizeData parameter
3cad0316 SPIGOT-6714: Don't fire PlayerBucketEvent when empty
8c6d60cf Fix server crash with BlockPopulator when entities are at a negative chunk border
4f6bcc84 SPIGOT-5880, SPIGOT-5567: New ChunkGenerator API
78d5b35b SPIGOT-6697: Restore generateTree with BlockChangeDelegate behaviour
15792f0d Rebuild patch
c949675e SPIGOT-6713: Cancelling EntityTransformEvent Causes Deceased Slimes To Not Despawn
a955f15c Fix issues with new ChunkGenerator API
a0a37f41 SPIGOT-6630: Replacing an enchantment on an item creates a conflict error

Spigot Changes:
b166a49b Rebuild patches
3c1fc60a SPIGOT-6693: Composters only take in one item at custom hopper speeds
This commit is contained in:
Nassim Jahnke 2021-08-25 09:59:26 +02:00 committed by GitHub
parent 61a09c5102
commit 789bc79280
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
203 changed files with 766 additions and 822 deletions

View file

@ -22,10 +22,10 @@ wants it to collect even faster, they can restore that setting back to 1 instead
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9dc9153bd53b0d1e63d0367498a99271821217e0..5285a5b16b0b706d9e1728a23628ff12e6b3b55d 100644
index 7a0950a22009a0ae606e74da8026a224817d5037..65fcf1300022b66c87b00637775dbed02b2c734e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -354,7 +354,7 @@ public final class CraftServer implements Server {
@@ -360,7 +360,7 @@ public final class CraftServer implements Server {
this.ambientSpawn = this.configuration.getInt("spawn-limits.ambient");
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
@ -34,7 +34,7 @@ index 9dc9153bd53b0d1e63d0367498a99271821217e0..5285a5b16b0b706d9e1728a23628ff12
this.minimumAPI = this.configuration.getString("settings.minimum-api");
this.loadIcon();
}
@@ -839,7 +839,7 @@ public final class CraftServer implements Server {
@@ -845,7 +845,7 @@ public final class CraftServer implements Server {
this.waterAmbientSpawn = this.configuration.getInt("spawn-limits.water-ambient");
this.ambientSpawn = this.configuration.getInt("spawn-limits.ambient");
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
@ -44,10 +44,10 @@ index 9dc9153bd53b0d1e63d0367498a99271821217e0..5285a5b16b0b706d9e1728a23628ff12
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 600e68ab19121c63983633587a60a2ec4dc60d6a..32c24f9e37262f2a854556787f61cd7b7336da11 100644
index 059b901e79cf0e2d152375453d36437a43c4f244..496bb91da1138fb6a4e004da1eab43e588c82592 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -406,8 +406,21 @@ public class CraftWorld implements World {
@@ -265,8 +265,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public Chunk getChunkAt(int x, int z) {
@ -70,7 +70,7 @@ index 600e68ab19121c63983633587a60a2ec4dc60d6a..32c24f9e37262f2a854556787f61cd7b
@Override
public Chunk getChunkAt(Block block) {
@@ -482,7 +495,7 @@ public class CraftWorld implements World {
@@ -341,7 +354,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 600e68ab19121c63983633587a60a2ec4dc60d6a..32c24f9e37262f2a854556787f61cd7b
}
return true;
@@ -559,9 +572,12 @@ public class CraftWorld implements World {
@@ -418,9 +431,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 600e68ab19121c63983633587a60a2ec4dc60d6a..32c24f9e37262f2a854556787f61cd7b
if (immediate == null) {
immediate = world.getChunkSource().chunkMap.getUnloadingChunk(x, z);
}
@@ -569,7 +585,7 @@ public class CraftWorld implements World {
@@ -428,7 +444,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 600e68ab19121c63983633587a60a2ec4dc60d6a..32c24f9e37262f2a854556787f61cd7b
world.getChunk(x, z); // make sure we're at ticket level 32 or lower
return true;
}
@@ -595,7 +611,7 @@ public class CraftWorld implements World {
@@ -454,7 +470,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 600e68ab19121c63983633587a60a2ec4dc60d6a..32c24f9e37262f2a854556787f61cd7b
world.getChunkSource().getChunk(x, z, ChunkStatus.FULL, true);
return true;
// Paper end
@@ -2590,6 +2606,7 @@ public class CraftWorld implements World {
@@ -1898,6 +1914,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);