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

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:
ed0ec489 SPIGOT-7965: Unknown TransformReason for Hoglins
9db03457 SPIGOT-7964: Fix typo in Deprecation annotation
d14119af PR-1082: Add "since" to Deprecation annotations
e8a318d4 PR-1067: Add method to get Advancement requirements

CraftBukkit Changes:
40dd796db SPIGOT-7971: NotSerializableException on serialize CraftUseCooldownComponent
fa85c5e0a SPIGOT-7968: ProjectileHitEvent not trigerred when arrow hits entity
b75b792ec SPIGOT-7970: World#getMaxHeight() returning incorrect value
2b9a094bb SPIGOT-7965: Unknown TransformReason for Hoglins
fd3f5a380 SPIGOT-7966: Some trees do not generate with #generateTree
f2822317c PR-1515: Add a Class reader and Class node argument provider
07abf6852 PR-1514: Add a test case for ClassTraverser
a7577cb24 Fix Inventory#addItem not respecting max stack size
066a74e74 PR-1490: Add method to get Advancement requirements
4a1df30e4 PR-1512: Test Art class based on specific values instead of the implementation, to better catch implementation changes
53254c56f PR-1503: Simplify CAS loop to getAndSet
e9447dc5e Make BlockDataMeta#setBlockData hide unspecified states
dd08a7120 SPIGOT-7960: Fix inconsistency between natural item drop coordinates
e9e8ed753 SPIGOT-7960: Improve natural item drop methods

Spigot Changes:
60c9969b Rebuild patches
This commit is contained in:
Bjarne Koll
2024-12-03 15:47:48 +01:00
parent 65ca4c1911
commit 881d616533
50 changed files with 374 additions and 347 deletions

View File

@@ -1562,7 +1562,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
*/
@Deprecated
@Deprecated(since = "1.7.2")
public interface UnsafeValues {
+ // Paper start
+ net.kyori.adventure.text.flattener.ComponentFlattener componentFlattener();
@@ -1714,7 +1714,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- * @deprecated A sign may have multiple writable sides now. Use {@link Sign#getSide(Side)} and {@link SignSide#getLines()}.
+ * @deprecated A sign may have multiple writable sides now. Use {@link Sign#getSide(Side)} and {@link SignSide#lines()}.
*/
@Deprecated
@Deprecated(since = "1.20")
@NotNull
@@ -0,0 +0,0 @@ public interface Sign extends TileState, Colorable {
* @param index Line number to get the text from, starting at 0
@@ -1723,7 +1723,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- * @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#getLine(int)}.
+ * @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#line(int)}.
*/
@Deprecated
@Deprecated(since = "1.20")
@NotNull
@@ -0,0 +0,0 @@ public interface Sign extends TileState, Colorable {
* @param index Line number to set the text at, starting from 0
@@ -1732,7 +1732,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- * @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#setLine(int, String)}.
+ * @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#line(int, net.kyori.adventure.text.Component)}.
*/
@Deprecated
@Deprecated(since = "1.20")
public void setLine(int index, @NotNull String line) throws IndexOutOfBoundsException;
diff --git a/src/main/java/org/bukkit/block/sign/SignSide.java b/src/main/java/org/bukkit/block/sign/SignSide.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
@@ -1837,7 +1837,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return false;
@@ -0,0 +0,0 @@ public abstract class Command {
@Deprecated
@Deprecated(since = "1.20.4")
@Nullable
public String getPermissionMessage() {
- return permissionMessage;
@@ -1846,7 +1846,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
/**
@@ -0,0 +0,0 @@ public abstract class Command {
@Deprecated
@Deprecated(since = "1.20.4")
@NotNull
public Command setPermissionMessage(@Nullable String permissionMessage) {
- this.permissionMessage = permissionMessage;
@@ -2664,7 +2664,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- * should use {@link #setResourcePack(String)}.
+ * should use {@link #setResourcePack(UUID, String, byte[], net.kyori.adventure.text.Component, boolean)}.
*/
@Deprecated
@Deprecated(since = "1.7.2")
public void setTexturePack(@NotNull String url);
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the URL is null.
@@ -2947,7 +2947,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- * @deprecated API behavior subject to change
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} or {@link #sendTitlePart(net.kyori.adventure.title.TitlePart, Object)}
*/
@Deprecated
@Deprecated(since = "1.8.7")
public void sendTitle(@Nullable String title, @Nullable String subtitle);
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param fadeIn time in ticks for titles to fade in. Defaults to 10.
@@ -3136,7 +3136,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ // Paper end
+
@Deprecated
@Deprecated(since = "1.19.4")
public SignChangeEvent(@NotNull final Block theBlock, @NotNull final Player thePlayer, @NotNull final String[] theLines) {
this(theBlock, thePlayer, theLines, Side.FRONT);
}
@@ -3467,9 +3467,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ public void disallow(@NotNull final Result result, @NotNull final net.kyori.adventure.text.Component message) {
+ this.result = result;
this.message = message;
}
+ this.message = message;
+ }
+
+ /**
+ * Disallows the player from logging in, with the given reason
+ *
@@ -3482,8 +3482,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @Deprecated
+ public void disallow(@NotNull final PlayerPreLoginEvent.Result result, @NotNull final net.kyori.adventure.text.Component message) {
+ this.result = result == null ? null : Result.valueOf(result.name());
+ this.message = message;
+ }
this.message = message;
}
+ // Paper end
+ /**
+ * Gets the current kick message that will be used if getResult() !=
@@ -3508,7 +3508,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public void setKickMessage(@NotNull final String message) {
+ this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); // Paper
+ }
+
/**
* Allows the player to log in
*/
@@ -3534,7 +3534,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
/**
@@ -0,0 +0,0 @@ public class AsyncPlayerPreLoginEvent extends Event {
@Deprecated
@Deprecated(since = "1.3.2")
public void disallow(@NotNull final PlayerPreLoginEvent.Result result, @NotNull final String message) {
this.result = result == null ? null : Result.valueOf(result.name());
- this.message = message;
@@ -3558,7 +3558,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- * alternative for thread safe implementations.
+ * @deprecated Listening to this event forces chat to wait for the main thread, delaying chat messages. It is recommended to use {@link io.papermc.paper.event.player.AsyncChatEvent} instead, wherever possible.
*/
@Deprecated
@Deprecated(since = "1.3.1")
@Warning(reason = "Listening to this event forces chat to wait for the main thread, delaying chat messages.")
diff --git a/src/main/java/org/bukkit/event/player/PlayerEvent.java b/src/main/java/org/bukkit/event/player/PlayerEvent.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
@@ -4947,7 +4947,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
/**
@@ -0,0 +0,0 @@ public final class MapCursor {
*/
@Deprecated
@Deprecated(since = "1.6.2")
public MapCursor(byte x, byte y, byte direction, byte type, boolean visible) {
- this(x, y, direction, type, visible, null);
+ this(x, y, direction, type, visible, (String) null); // Paper
@@ -4970,7 +4970,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- * @deprecated Magic value, use {@link #MapCursor(byte, byte, byte, Type, boolean, String)}
+ * @deprecated Magic value. Use {@link #MapCursor(byte, byte, byte, Type, boolean, net.kyori.adventure.text.Component)}
*/
@Deprecated
@Deprecated(since = "1.13")
public MapCursor(byte x, byte y, byte direction, byte type, boolean visible, @Nullable String caption) {
@@ -0,0 +0,0 @@ public final class MapCursor {
setDirection(direction);
@@ -4996,7 +4996,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ this.x = x; this.y = y; this.visible = visible; this.caption = caption;
+ setDirection(direction);
+ setRawType(type);
}
+ }
+ /**
+ * Initialize the map cursor.
+ *
@@ -5011,7 +5011,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ this.x = x; this.y = y; this.visible = visible; this.caption = caption;
+ setDirection(direction);
+ setType(type);
+ }
}
+ // Paper end
/**
@@ -5290,7 +5290,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- * @deprecated use {@link #registerNewObjective(String, Criteria, String)}
+ * @deprecated use {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component)}
*/
@Deprecated
@Deprecated(since = "1.20.5")
@NotNull
@@ -0,0 +0,0 @@ public interface Scoreboard {
* characters.
@@ -5299,7 +5299,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- * @deprecated use {@link #registerNewObjective(String, Criteria, String, RenderType)}
+ * @deprecated use {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component, RenderType)}
*/
@Deprecated
@Deprecated(since = "1.20.5")
@NotNull
@@ -0,0 +0,0 @@ public interface Scoreboard {
* characters.