aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBoy0000 <[email protected]>2024-06-19 00:57:36 +0200
committerOwen1212055 <[email protected]>2024-11-18 14:50:38 -0500
commite9c1463aae99e7c8e1921d73ed6a36846f91a88d (patch)
treeb75d1a91c6b888c9099ebe76651b5fc816a67662
parente88c188ffe0623870ef0e68809d0aec9ef3006a6 (diff)
downloadPaper-e9c1463aae99e7c8e1921d73ed6a36846f91a88d.tar.gz
Paper-e9c1463aae99e7c8e1921d73ed6a36846f91a88d.zip
fix MapItemColor & typo in JUKEBOX_PLAYABLE (#10906)
* fix MapItemColor, typo in JUKEBOX_PLAYABLE * fix: add missing jukeboxSong getter
-rw-r--r--patches/api/0480-WIP-DataComponent-API.patch18
-rw-r--r--patches/server/1026-WIP-DataComponent-API.patch15
2 files changed, 20 insertions, 13 deletions
diff --git a/patches/api/0480-WIP-DataComponent-API.patch b/patches/api/0480-WIP-DataComponent-API.patch
index 2904a49259..abc31f57bb 100644
--- a/patches/api/0480-WIP-DataComponent-API.patch
+++ b/patches/api/0480-WIP-DataComponent-API.patch
@@ -138,7 +138,7 @@ index 0000000000000000000000000000000000000000..50d15b4e0ed5cd17fdc95476ee4650ef
+}
diff --git a/src/main/java/io/papermc/paper/component/DataComponentTypes.java b/src/main/java/io/papermc/paper/component/DataComponentTypes.java
new file mode 100644
-index 0000000000000000000000000000000000000000..b404d32baa750f0a5d27a9a3fa1b454d1bd4e4f6
+index 0000000000000000000000000000000000000000..f5cc964e0976b5c256cc2271c31942cc87a34388
--- /dev/null
+++ b/src/main/java/io/papermc/paper/component/DataComponentTypes.java
@@ -0,0 +1,116 @@
@@ -230,7 +230,7 @@ index 0000000000000000000000000000000000000000..b404d32baa750f0a5d27a9a3fa1b454d
+ // block_entity_data
+ public static final DataComponentType.Valued<MusicInstrument> INSTRUMENT = valued("instrument");
+ public static final DataComponentType.Valued<Integer> OMINOUS_BOTTLE_AMPLIFIER = valued("ominous_bottle_amplifier");
-+ public static final DataComponentType.Valued<JukeboxPlayable> JUKEBOX_PLAYALE = valued("jukebox_playable");
++ public static final DataComponentType.Valued<JukeboxPlayable> JUKEBOX_PLAYABLE = valued("jukebox_playable");
+ public static final DataComponentType.Valued<List<Key>> RECIPES = valued("recipes");
+ public static final DataComponentType.Valued<LodestoneTracker> LODESTONE_TRACKER = valued("lodestone_tracker");
+ public static final DataComponentType.Valued<FireworkEffect> FIREWORK_EXPLOSION = valued("firework_explosion");
@@ -438,7 +438,7 @@ index 0000000000000000000000000000000000000000..48f5b0a3bceb4312a5a2e10ee27811ce
+}
diff --git a/src/main/java/io/papermc/paper/component/item/ComponentTypesBridge.java b/src/main/java/io/papermc/paper/component/item/ComponentTypesBridge.java
new file mode 100644
-index 0000000000000000000000000000000000000000..f05ccb7973028c9853de57406a514113b4257079
+index 0000000000000000000000000000000000000000..59db78f559404777ba6e711a0b2c267d750ec6c8
--- /dev/null
+++ b/src/main/java/io/papermc/paper/component/item/ComponentTypesBridge.java
@@ -0,0 +1,87 @@
@@ -491,7 +491,7 @@ index 0000000000000000000000000000000000000000..f05ccb7973028c9853de57406a514113
+
+ SuspiciousStewEffects.Builder suspiciousStewEffects();
+
-+ BundleContents.Builder mapItemColor();
++ MapItemColor.Builder mapItemColor();
+
+ MapID.Builder mapId();
+
@@ -987,10 +987,10 @@ index 0000000000000000000000000000000000000000..f2db3054e16bcdd615b98cc728d17f96
+}
diff --git a/src/main/java/io/papermc/paper/component/item/JukeboxPlayable.java b/src/main/java/io/papermc/paper/component/item/JukeboxPlayable.java
new file mode 100644
-index 0000000000000000000000000000000000000000..85ebf9c5e372ffc15b556c48f52baba540da1afa
+index 0000000000000000000000000000000000000000..d039388819d241a8ffeadab5d806387b61a0f9db
--- /dev/null
+++ b/src/main/java/io/papermc/paper/component/item/JukeboxPlayable.java
-@@ -0,0 +1,28 @@
+@@ -0,0 +1,30 @@
+package io.papermc.paper.component.item;
+
+import io.papermc.paper.component.ComponentBuilder;
@@ -1010,6 +1010,8 @@ index 0000000000000000000000000000000000000000..85ebf9c5e372ffc15b556c48f52baba5
+ return ComponentTypesBridge.bridge().jukeboxPlayable();
+ }
+
++ @Contract(pure = true)
++ @NonNull JukeboxSong jukeboxSong();
+
+ @ApiStatus.NonExtendable
+ interface Builder extends ShownInTooltip.Builder<JukeboxPlayable.Builder>, ComponentBuilder<JukeboxPlayable> {
@@ -1194,7 +1196,7 @@ index 0000000000000000000000000000000000000000..fb895caa1c5acc8116b9c52021835e18
+}
diff --git a/src/main/java/io/papermc/paper/component/item/MapItemColor.java b/src/main/java/io/papermc/paper/component/item/MapItemColor.java
new file mode 100644
-index 0000000000000000000000000000000000000000..4c606e1d4856a912dc407b6047cb9e024e822cb3
+index 0000000000000000000000000000000000000000..025e2edd791db72b87f4e43bdda6647cfe6b3d7e
--- /dev/null
+++ b/src/main/java/io/papermc/paper/component/item/MapItemColor.java
@@ -0,0 +1,27 @@
@@ -1209,7 +1211,7 @@ index 0000000000000000000000000000000000000000..4c606e1d4856a912dc407b6047cb9e02
+public interface MapItemColor {
+
+ @Contract(value = "-> new", pure = true)
-+ static BundleContents.@NonNull Builder mapItemColor() {
++ static MapItemColor.@NonNull Builder mapItemColor() {
+ return ComponentTypesBridge.bridge().mapItemColor();
+ }
+
diff --git a/patches/server/1026-WIP-DataComponent-API.patch b/patches/server/1026-WIP-DataComponent-API.patch
index c6ff3b83df..f43fbcfb27 100644
--- a/patches/server/1026-WIP-DataComponent-API.patch
+++ b/patches/server/1026-WIP-DataComponent-API.patch
@@ -355,7 +355,7 @@ index 0000000000000000000000000000000000000000..5639559368e6866e9b0afa6688f3b12c
+}
diff --git a/src/main/java/io/papermc/paper/component/item/ComponentTypesBridgesImpl.java b/src/main/java/io/papermc/paper/component/item/ComponentTypesBridgesImpl.java
new file mode 100644
-index 0000000000000000000000000000000000000000..2e0996b652ecc01d4f53963e73340dc2828aecab
+index 0000000000000000000000000000000000000000..071df718283271df1a148e9ad4654da70e58d4c0
--- /dev/null
+++ b/src/main/java/io/papermc/paper/component/item/ComponentTypesBridgesImpl.java
@@ -0,0 +1,173 @@
@@ -438,8 +438,8 @@ index 0000000000000000000000000000000000000000..2e0996b652ecc01d4f53963e73340dc2
+ }
+
+ @Override
-+ public BundleContents.Builder mapItemColor() {
-+ return new PaperBundleContents.BuilderImpl();
++ public MapItemColor.Builder mapItemColor() {
++ return new PaperMapItemColor.BuilderImpl();
+ }
+
+ @Override
@@ -1801,10 +1801,10 @@ index 0000000000000000000000000000000000000000..67efd3e55c95567187319010d7ea825f
+}
diff --git a/src/main/java/io/papermc/paper/component/item/PaperJukeboxPlayable.java b/src/main/java/io/papermc/paper/component/item/PaperJukeboxPlayable.java
new file mode 100644
-index 0000000000000000000000000000000000000000..dbf25090748b0c6b675a4681f0d0c1b826f6757b
+index 0000000000000000000000000000000000000000..b9970492ea094c94b7c323115189c09656f0b364
--- /dev/null
+++ b/src/main/java/io/papermc/paper/component/item/PaperJukeboxPlayable.java
-@@ -0,0 +1,62 @@
+@@ -0,0 +1,67 @@
+package io.papermc.paper.component.item;
+
+import com.google.common.base.Preconditions;
@@ -1844,6 +1844,11 @@ index 0000000000000000000000000000000000000000..dbf25090748b0c6b675a4681f0d0c1b8
+ return new PaperJukeboxPlayable(this.impl.withTooltip(showInTooltip));
+ }
+
++ @Override
++ public JukeboxSong jukeboxSong() {
++ return CraftJukeboxSong.minecraftHolderToBukkit(this.impl.song().holder().get());
++ }
++
+ static final class BuilderImpl implements Builder {
+
+ private JukeboxSong song = null;