From d1a11cca31488df0c76fb506d5a3f6f6e795aad0 Mon Sep 17 00:00:00 2001 From: caramel Date: Sun, 28 Apr 2024 12:32:11 +0900 Subject: [PATCH] Fix the incorrect codec usage in the Style convert (#10465) --- patches/server/Adventure.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/Adventure.patch b/patches/server/Adventure.patch index 2d6159af3c..3b8b766ba9 100644 --- a/patches/server/Adventure.patch +++ b/patches/server/Adventure.patch @@ -1624,7 +1624,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public static net.minecraft.network.chat.Style asVanilla(final Style style) { + final RegistryOps 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..00000000000000000000000000000000 + public static Style asAdventure(final net.minecraft.network.chat.Style style) { + final RegistryOps 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);