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

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:
63c208dd Remove no longer used import
70be76c7 PR-958: Further clarify deprecation of TAG_CONTAINER_ARRAY
ae21f4ac PR-955: Add methods to place structures with block/entity transformers
e3d960f2 SPIGOT-7547: Remark that Damageable#setAbsorptionAmount() is capped to a specific value
b125516c Fix typo in RecipeChoice.ExactChoice docs
309497c1 Add EntityMountEvent and EntityDismount Event
2fd45ae3 Improve ItemFactory#enchantItem consistency
2b198268 PR-933: Define native persistent data types for lists

CraftBukkit Changes:
771182f70 PR-1327: Add methods to place structures with block/entity transformers
e41ad4c82 SPIGOT-7567: SpawnReason for SNOWMAN is reported as BUILD_IRONGOLEM
76931e8bd Add EntityMountEvent and EntityDismount Event
9b29b21c7 PR-1183: Better handle lambda expression and renaming of classes in Commodore
1462ebe85 Reformat Commodore.java
9fde4c037 PR-1324: Improve ItemFactory#enchantItem consistency
4e419c774 PR-1295: Define native persistent data types for lists
dd8cca388 SPIGOT-7562: Fix Score#getScore and Score#isScoreSet
690278200 Only fetch an online UUID in online mode
1da8d9a53 Fire PreLogin events even in offline mode
2e88514ad PR-1325: Use CraftBlockType and CraftItemType instead of CraftMagicNumbers to convert between minecraft and bukkit block / item representation

Spigot Changes:
864e4acc Restore accidentally removed package-info.java
f91a10d5 Remove obsolete EntityMountEvent and EntityDismountEvent
828f0593 SPIGOT-7558: Deprecate silenceable lightning API as sound is now client-side and cannot be removed
cdc4e035 Remove obsolete patch fetching correct mode UUIDs
49e36b8e Merge related BungeeCord patches
6e87b9ab Remove obsolete firing of PreLogin events in offline mode
5c76b183 Remove redundant patch dealing with exceptions in the crash reporter
3a2219d1 Remove redundant patch logging cause of unexpected exception
This commit is contained in:
Jake Potrebic 2024-01-14 01:46:04 -08:00 committed by GitHub
parent 78fcb8e766
commit 8657cd91d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
181 changed files with 920 additions and 977 deletions

View file

@ -712,7 +712,7 @@ index daedf825e68655492f5ab776bc206a5eb87c0170..7de24c39b460e43d27839b3821e67213
} catch (Exception exception) {
label25:
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 47f01de166a4048824f3075deb596084b7d42978..57e15d66bf59c23d9dc87aa811ff6c3c2084a4c4 100644
index 3691fd58c7baf98b15c50fa4dacf3a35f4f9b4b8..069af49a03e0d313499f8d1815c8299ec034de61 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -186,7 +186,7 @@ import org.bukkit.craftbukkit.Main;
@ -732,7 +732,7 @@ index 47f01de166a4048824f3075deb596084b7d42978..57e15d66bf59c23d9dc87aa811ff6c3c
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@@ -1144,9 +1145,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1138,9 +1139,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private boolean haveTime() {
// CraftBukkit start
@ -754,7 +754,7 @@ index 47f01de166a4048824f3075deb596084b7d42978..57e15d66bf59c23d9dc87aa811ff6c3c
private void executeModerately() {
this.runAllTasks();
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
@@ -1154,9 +1167,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1148,9 +1161,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
protected void waitUntilNextTick() {
@ -766,7 +766,7 @@ index 47f01de166a4048824f3075deb596084b7d42978..57e15d66bf59c23d9dc87aa811ff6c3c
});
}
@@ -1245,9 +1258,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1239,9 +1252,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void tickServer(BooleanSupplier shouldKeepTicking) {
@ -785,7 +785,7 @@ index 47f01de166a4048824f3075deb596084b7d42978..57e15d66bf59c23d9dc87aa811ff6c3c
++this.tickCount;
this.tickRateManager.tick();
this.tickChildren(shouldKeepTicking);
@@ -1261,15 +1282,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1255,15 +1276,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.autosavePeriod > 0 && this.ticksUntilAutosave <= 0) {
this.ticksUntilAutosave = this.autosavePeriod;
// CraftBukkit end
@ -806,7 +806,7 @@ index 47f01de166a4048824f3075deb596084b7d42978..57e15d66bf59c23d9dc87aa811ff6c3c
this.profiler.push("tallying");
long j = Util.getNanos() - i;
int k = this.tickCount % 100;
@@ -1283,8 +1307,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1277,8 +1301,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.logTickTime(l - i);
this.profiler.pop();
org.spigotmc.WatchdogThread.tick(); // Spigot
@ -816,7 +816,7 @@ index 47f01de166a4048824f3075deb596084b7d42978..57e15d66bf59c23d9dc87aa811ff6c3c
}
private int computeNextAutosaveInterval() {
@@ -1346,26 +1369,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1340,26 +1363,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
entityplayer.connection.suspendFlushing();
});
@ -850,7 +850,7 @@ index 47f01de166a4048824f3075deb596084b7d42978..57e15d66bf59c23d9dc87aa811ff6c3c
// Send time updates to everyone, it will get the right time from the world the player is in.
if (this.tickCount % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@@ -1373,7 +1396,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1367,7 +1390,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level().getGameTime(), entityplayer.getPlayerTime(), entityplayer.level().getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
}
}
@ -859,7 +859,7 @@ index 47f01de166a4048824f3075deb596084b7d42978..57e15d66bf59c23d9dc87aa811ff6c3c
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
@@ -1419,24 +1442,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1406,24 +1429,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
this.profiler.popPush("connection");
@ -1242,7 +1242,7 @@ index aa2c9b13b86130a613ed171a3c16f3639e7c82c6..d00b789d8deb0163726acbcb10edb096
this.entityManager.saveAll();
} else {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 36e659171d299b116b48cae868a20be467ce4ae2..38260251813a8fc5d1f5c1b2bbec9a112d00bafd 100644
index d13a662895737180f3d75b6e357ff90c72b0fe08..ce7caf08865df9ff032ba6c42308ea3ce4de6226 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -322,7 +322,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -1313,7 +1313,7 @@ index 6e9f5a404511f3703298def67402b87eca2f28a0..f5a4191977e8675952fc689744c8a39e
public UserWhiteList getWhiteList() {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d0f1cd32aa71f275c9975d1cedc8895fb2e8a174..a1a744657f8802852c161258382c5891858ebfa6 100644
index a1f658f4dafd47de0020d96667b090aa88c69f9c..8811646495f37587e7976edd8b9558cda412edb1 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -135,7 +135,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
@ -1324,7 +1324,7 @@ index d0f1cd32aa71f275c9975d1cedc8895fb2e8a174..a1a744657f8802852c161258382c5891
import org.bukkit.event.entity.EntityCombustByEntityEvent;
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
@@ -312,7 +311,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -314,7 +313,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// Marks an entity, that it was removed by a plugin via Entity#remove
// Main use case currently is for SPIGOT-7487, preventing dropping of leash when leash is removed
public boolean pluginRemoved = false;
@ -1332,7 +1332,7 @@ index d0f1cd32aa71f275c9975d1cedc8895fb2e8a174..a1a744657f8802852c161258382c5891
// Spigot start
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
@@ -809,7 +807,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -811,7 +809,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public void move(MoverType movementType, Vec3 movement) {
@ -1340,7 +1340,7 @@ index d0f1cd32aa71f275c9975d1cedc8895fb2e8a174..a1a744657f8802852c161258382c5891
if (this.noPhysics) {
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
} else {
@@ -970,7 +967,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -972,7 +969,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.level().getProfiler().pop();
}
}
@ -1603,7 +1603,7 @@ index 0eb09ce5c850d85ffd7229d27cf06b3e0edda11b..cc1d7626a82881c4410d65c6a33dadae
};
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a34037d03674ab64c1ef15a4c0cdb63dbad6d7af..491f59cdf41b686b7d03533c8d34cf367d6c658e 100644
index 6a6923c1bc597831921cc3515e0e94f5172ef3e1..f7ff043c99268d5d8d139e2a4d8cd0817b7bb96b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -368,7 +368,7 @@ public final class CraftServer implements Server {
@ -1615,7 +1615,7 @@ index a34037d03674ab64c1ef15a4c0cdb63dbad6d7af..491f59cdf41b686b7d03533c8d34cf36
this.overrideSpawnLimits();
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
@@ -2548,12 +2548,31 @@ public final class CraftServer implements Server {
@@ -2547,12 +2547,31 @@ public final class CraftServer implements Server {
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
{