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

* 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:
8085edde SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls
04c7e13c PR-719: Add Player Profile API
71564210 SPIGOT-6910: Add BlockDamageAbortEvent

CraftBukkit Changes:
febaa1c6 SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls
9dafd109 Don't send updates over large distances
bdac46b0 SPIGOT-6782: EntityPortalEvent should not destroy entity when setTo() uses same world as getFrom()
8f361ece PR-1002: Add Player Profile API
911875d4 Increase outdated build delay
e5f8a767 SPIGOT-6917: Use main scoreboard for /trigger
a672a531 Clean up callBlockDamageEvent
8e1bdeef SPIGOT-6910: Add BlockDamageAbortEvent

Spigot Changes:
6edb62f3 Rebuild patches
7fbc6a1e Rebuild patches

* Updated Upstream (CraftBukkit)

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

CraftBukkit Changes:
de951355 SPIGOT-6927: Fix default value of spawn-limits in Worlds
This commit is contained in:
Nassim Jahnke 2022-02-12 14:20:33 +01:00 committed by GitHub
parent 00da0989f3
commit 26734e83b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
313 changed files with 1540 additions and 1298 deletions

View file

@ -22,11 +22,11 @@ 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 52fabc8cd1b76a825a13d39f38ca982e252cb39b..54598af96488c47b613de8eb8eb0bf31ea84743f 100644
index f796194c1c7cc8a656eef0f50b83ce7b7898e895..e41cbccb533327f8ab159f30be81a1cbeb5d37c3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -372,7 +372,7 @@ public final class CraftServer implements Server {
this.ambientSpawn = this.configuration.getInt("spawn-limits.ambient");
@@ -361,7 +361,7 @@ public final class CraftServer implements Server {
this.overrideSpawnLimits();
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
- TicketType.PLUGIN.timeout = this.configuration.getInt("chunk-gc.period-in-ticks");
@ -34,9 +34,9 @@ index 52fabc8cd1b76a825a13d39f38ca982e252cb39b..54598af96488c47b613de8eb8eb0bf31
this.minimumAPI = this.configuration.getString("settings.minimum-api");
this.loadIcon();
}
@@ -922,7 +922,7 @@ public final class CraftServer implements Server {
this.waterUndergroundCreatureSpawn = this.configuration.getInt("spawn-limits.water-underground-creature");
this.ambientSpawn = this.configuration.getInt("spawn-limits.ambient");
@@ -927,7 +927,7 @@ public final class CraftServer implements Server {
this.console.setMotd(config.motd);
this.overrideSpawnLimits();
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
- TicketType.PLUGIN.timeout = this.configuration.getInt("chunk-gc.period-in-ticks");
+ TicketType.PLUGIN.timeout = Math.min(20, configuration.getInt("chunk-gc.period-in-ticks")); // Paper - cap plugin loads to 1 second
@ -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 0ef9fc9cecdefcec3369c45643e474c16a588cea..bcb3a7e64f317732c8c758d4e743d84233bdafa6 100644
index fe35d72dd2e13bce16c7b02d726144ff6cb2ecbe..fd82082326e9f4c572803ba1f525c7125a89222a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -268,8 +268,21 @@ public class CraftWorld extends CraftRegionAccessor 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 0ef9fc9cecdefcec3369c45643e474c16a588cea..bcb3a7e64f317732c8c758d4e743d842
@Override
public Chunk getChunkAt(Block block) {
@@ -336,7 +349,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -333,7 +346,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 0ef9fc9cecdefcec3369c45643e474c16a588cea..bcb3a7e64f317732c8c758d4e743d842
}
return true;
@@ -414,9 +427,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -411,9 +424,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 0ef9fc9cecdefcec3369c45643e474c16a588cea..bcb3a7e64f317732c8c758d4e743d842
if (immediate == null) {
immediate = world.getChunkSource().chunkMap.getUnloadingChunk(x, z);
}
@@ -424,7 +440,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -421,7 +437,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 0ef9fc9cecdefcec3369c45643e474c16a588cea..bcb3a7e64f317732c8c758d4e743d842
world.getChunk(x, z); // make sure we're at ticket level 32 or lower
return true;
}
@@ -450,7 +466,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -447,7 +463,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 0ef9fc9cecdefcec3369c45643e474c16a588cea..bcb3a7e64f317732c8c758d4e743d842
world.getChunkSource().getChunk(x, z, ChunkStatus.FULL, true);
return true;
// Paper end
@@ -1935,6 +1951,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1968,6 +1984,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);