aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcaramel <[email protected]>2024-04-28 12:32:11 +0900
committerGitHub <[email protected]>2024-04-27 20:32:11 -0700
commita3c4dc95e3b6ac1e0069988d4abce33b642fecf5 (patch)
treeb751c50c79d519cb8a28b68fdc7937ef9552e9fc
parentf187fd696aa2bec774b1199b2e3c6937dd12937f (diff)
downloadPaper-a3c4dc95e3b6ac1e0069988d4abce33b642fecf5.tar.gz
Paper-a3c4dc95e3b6ac1e0069988d4abce33b642fecf5.zip
Fix the incorrect codec usage in the Style convert (#10465)
-rw-r--r--patches/server/0010-Adventure.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch
index 37b65b0ca7..19562689dd 100644
--- a/patches/server/0010-Adventure.patch
+++ b/patches/server/0010-Adventure.patch
@@ -1157,7 +1157,7 @@ index 0000000000000000000000000000000000000000..2fd6c3e65354071af71c7d8ebb97b559
+}
diff --git a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
new file mode 100644
-index 0000000000000000000000000000000000000000..cb9f8567ba6aae41a6cde519ac0cff0169a7cea7
+index 0000000000000000000000000000000000000000..fc6e13e4f2408ccbfa645eae2d7ebf4dcfc21908
--- /dev/null
+++ b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
@@ -0,0 +1,478 @@
@@ -1624,7 +1624,7 @@ index 0000000000000000000000000000000000000000..cb9f8567ba6aae41a6cde519ac0cff01
+ public static net.minecraft.network.chat.Style asVanilla(final Style style) {
+ final RegistryOps<Object> ops = RegistryOps.create(JavaOps.INSTANCE, CraftRegistry.getMinecraftRegistry());
+ final Object encoded = AdventureCodecs.STYLE_MAP_CODEC.codec()
-+ .parse(ops, style).getOrThrow(IllegalStateException::new);
++ .encodeStart(ops, style).getOrThrow(IllegalStateException::new);
+
+ return net.minecraft.network.chat.Style.Serializer.CODEC
+ .parse(ops, encoded).getOrThrow(IllegalStateException::new);
@@ -1633,7 +1633,7 @@ index 0000000000000000000000000000000000000000..cb9f8567ba6aae41a6cde519ac0cff01
+ public static Style asAdventure(final net.minecraft.network.chat.Style style) {
+ final RegistryOps<Object> ops = RegistryOps.create(JavaOps.INSTANCE, CraftRegistry.getMinecraftRegistry());
+ final Object encoded = net.minecraft.network.chat.Style.Serializer.CODEC
-+ .parse(ops, style).getOrThrow(IllegalStateException::new);
++ .encodeStart(ops, style).getOrThrow(IllegalStateException::new);
+
+ return AdventureCodecs.STYLE_MAP_CODEC.codec()
+ .parse(ops, encoded).getOrThrow(IllegalStateException::new);