Updated Upstream (Bukkit/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

Bukkit Changes:
e2160a18 Make MapCursor#type not depends on deprecated values

CraftBukkit Changes:
6ce172642 SPIGOT-7761: Ender pearl does not damage or spawn endermites
f5a63f734 SPIGOT-7759: Chunk not there when requested in ChunkUnloadEvent
28287259c Remove unused import
eb9a7dde0 SPIGOT-7757: Cannot set item in Stonecutter Inventory
f8be9d752 Move deserialized removed unhandled tags to dedicated removedTags
a7e576186 Fix potential mutability issue with CraftMetaItem copy constructor
995885452 SPIGOT-7741: Vanilla ItemComponent in commands can't remove components
9ef69aa0b PR-1284: Move ItemType <-> ItemMeta linking to a centralized place
3e82eafbe PR-1420: Fix DirectEntity and CausingEntity Damager for Creepers ignited by Player
c23daa71f SPIGOT-7751: Fix crash caused by arrows from trial spawners
Make MapCursor#type not depends on deprecated values
SPIGOT-7761: Ender pearl does not damage or spawn endermites
This commit is contained in:
Nassim Jahnke 2024-06-15 18:28:18 +02:00
parent 5d834b1b71
commit 4bc15f13aa
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
163 changed files with 758 additions and 725 deletions

View file

@ -4804,19 +4804,19 @@ index bd512a7840d4686759097ee4cbd8b375c530956b..f2242ddc4085f7e7cdd748d860857822
+ // Paper end - adventure
}
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
index 7736ef1020b658206056af02fdb8c04de2d55541..4e84e3c5d0fa23bbb063d8429c18abcd7ee6b82a 100644
index e645a65dbd3340a86f5325dbfd515e0a99f31ab0..940066ec529acc4cb9c8136f15345f100ea9467e 100644
--- a/src/main/java/org/bukkit/map/MapCursor.java
+++ b/src/main/java/org/bukkit/map/MapCursor.java
@@ -12,7 +12,7 @@ public final class MapCursor {
@@ -13,7 +13,7 @@ public final class MapCursor {
private byte x, y;
private byte direction, type;
private byte direction;
private boolean visible;
- private String caption;
+ private net.kyori.adventure.text.Component caption; // Paper
private Type type;
/**
* Initialize the map cursor.
@@ -26,7 +26,7 @@ public final class MapCursor {
@@ -28,7 +28,7 @@ public final class MapCursor {
*/
@Deprecated
public MapCursor(byte x, byte y, byte direction, byte type, boolean visible) {
@ -4825,7 +4825,7 @@ index 7736ef1020b658206056af02fdb8c04de2d55541..4e84e3c5d0fa23bbb063d8429c18abcd
}
/**
@@ -39,7 +39,7 @@ public final class MapCursor {
@@ -41,7 +41,7 @@ public final class MapCursor {
* @param visible Whether the cursor is visible by default.
*/
public MapCursor(byte x, byte y, byte direction, @NotNull Type type, boolean visible) {
@ -4834,22 +4834,22 @@ index 7736ef1020b658206056af02fdb8c04de2d55541..4e84e3c5d0fa23bbb063d8429c18abcd
}
/**
@@ -51,7 +51,7 @@ public final class MapCursor {
@@ -53,7 +53,7 @@ public final class MapCursor {
* @param type The type (color/style) of the map cursor.
* @param visible Whether the cursor is visible by default.
* @param caption cursor caption
- * @deprecated Magic value
+ * @deprecated Magic value. Use {@link #MapCursor(byte, byte, byte, byte, boolean, net.kyori.adventure.text.Component)}
- * @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
public MapCursor(byte x, byte y, byte direction, byte type, boolean visible, @Nullable String caption) {
@@ -60,8 +60,42 @@ public final class MapCursor {
@@ -62,8 +62,42 @@ public final class MapCursor {
setDirection(direction);
setRawType(type);
this.visible = visible;
- this.caption = caption;
+ this.caption = caption == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(caption); // Paper
}
+ }
+ // Paper start
+ /**
+ * Initialize the map cursor.
@ -4867,7 +4867,7 @@ index 7736ef1020b658206056af02fdb8c04de2d55541..4e84e3c5d0fa23bbb063d8429c18abcd
+ this.x = x; this.y = y; this.visible = visible; this.caption = caption;
+ setDirection(direction);
+ setRawType(type);
+ }
}
+ /**
+ * Initialize the map cursor.
+ *
@ -4887,25 +4887,25 @@ index 7736ef1020b658206056af02fdb8c04de2d55541..4e84e3c5d0fa23bbb063d8429c18abcd
/**
* Initialize the map cursor.
@@ -79,7 +113,7 @@ public final class MapCursor {
@@ -81,7 +115,7 @@ public final class MapCursor {
setDirection(direction);
setType(type);
this.type = type;
this.visible = visible;
- this.caption = caption;
+ this.caption = caption == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(caption); // Paper
}
/**
@@ -202,23 +236,45 @@ public final class MapCursor {
@@ -200,23 +234,45 @@ public final class MapCursor {
this.visible = visible;
}
+ // Paper start
+ /**
+ * Gets the caption on this cursor.
+ *
+ * @return caption
+ */
/**
* Gets the caption on this cursor.
*
* @return caption
*/
+ public net.kyori.adventure.text.@Nullable Component caption() {
+ return this.caption;
+ }
@ -4918,12 +4918,12 @@ index 7736ef1020b658206056af02fdb8c04de2d55541..4e84e3c5d0fa23bbb063d8429c18abcd
+ this.caption = caption;
+ }
+ // Paper end
/**
* Gets the caption on this cursor.
*
* @return caption
+ /**
+ * Gets the caption on this cursor.
+ *
+ * @return caption
+ * @deprecated in favour of {@link #caption()}
*/
+ */
@Nullable
+ @Deprecated // Paper
public String getCaption() {