From 0fadaed0783782877502a24fac53a63753959191 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Mon, 11 Dec 2023 22:08:51 -0800 Subject: [ci skip] move decomp fixes to correct patch --- patches/server/0006-MC-Dev-fixes.patch | 22 ++++++++++++++++++++++ patches/server/0010-Adventure.patch | 20 +------------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/patches/server/0006-MC-Dev-fixes.patch b/patches/server/0006-MC-Dev-fixes.patch index 664ab6bd34..a9f780a71c 100644 --- a/patches/server/0006-MC-Dev-fixes.patch +++ b/patches/server/0006-MC-Dev-fixes.patch @@ -52,6 +52,28 @@ index bfac303dc0c11a0e741b29f3700823c69e55c798..ac1aa37329bd4d411964ea34ea8147f6 public static final int NOT_REGISTERED = -1; private final String id; +diff --git a/src/main/java/net/minecraft/network/chat/ComponentSerialization.java b/src/main/java/net/minecraft/network/chat/ComponentSerialization.java +index 60228c3778e53ca5c513cd265e5e08d151573a4f..49138ccda0f378b13c7f425be765876eb4026b06 100644 +--- a/src/main/java/net/minecraft/network/chat/ComponentSerialization.java ++++ b/src/main/java/net/minecraft/network/chat/ComponentSerialization.java +@@ -86,7 +86,7 @@ public class ComponentSerialization { + for(MapDecoder mapDecoder : this.codecs) { + DataResult dataResult = mapDecoder.decode(dynamicOps, mapLike); + if (dataResult.result().isPresent()) { +- return dataResult; ++ return (DataResult) dataResult; // Paper - decomp fix + } + } + +@@ -96,7 +96,7 @@ public class ComponentSerialization { + } + + public RecordBuilder encode(T object, DynamicOps dynamicOps, RecordBuilder recordBuilder) { +- MapEncoder mapEncoder = this.encoderGetter.apply(object); ++ MapEncoder mapEncoder = (MapEncoder) this.encoderGetter.apply(object); // Paper - decomp fix + return mapEncoder.encode(object, dynamicOps, recordBuilder); + } + diff --git a/src/main/java/net/minecraft/network/chat/ComponentUtils.java b/src/main/java/net/minecraft/network/chat/ComponentUtils.java index 13c8051da164bed579fbda44af059a36b8f00a0e..b6506e881ef337bfd2a7a0644296b48b7300a0f6 100644 --- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index 49b0841e1c..5549de0b8d 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -2270,7 +2270,7 @@ index d3a80d0a23be762c05931ae8001d98e43cab2b4a..e0037b99838519eee5fb6f7e95ffaad2 } } diff --git a/src/main/java/net/minecraft/network/chat/ComponentSerialization.java b/src/main/java/net/minecraft/network/chat/ComponentSerialization.java -index 60228c3778e53ca5c513cd265e5e08d151573a4f..ddc91d376fd59da982e594188fcef7202a2a5972 100644 +index 49138ccda0f378b13c7f425be765876eb4026b06..ddc91d376fd59da982e594188fcef7202a2a5972 100644 --- a/src/main/java/net/minecraft/network/chat/ComponentSerialization.java +++ b/src/main/java/net/minecraft/network/chat/ComponentSerialization.java @@ -61,6 +61,33 @@ public class ComponentSerialization { @@ -2307,24 +2307,6 @@ index 60228c3778e53ca5c513cd265e5e08d151573a4f..ddc91d376fd59da982e594188fcef720 return Codec.either(Codec.either(Codec.STRING, ExtraCodecs.nonEmptyList(selfCodec.listOf())), codec).xmap((either) -> { return either.map((either2) -> { return either2.map(Component::literal, ComponentSerialization::createFromList); -@@ -86,7 +113,7 @@ public class ComponentSerialization { - for(MapDecoder mapDecoder : this.codecs) { - DataResult dataResult = mapDecoder.decode(dynamicOps, mapLike); - if (dataResult.result().isPresent()) { -- return dataResult; -+ return (DataResult) dataResult; // Paper - decomp fix - } - } - -@@ -96,7 +123,7 @@ public class ComponentSerialization { - } - - public RecordBuilder encode(T object, DynamicOps dynamicOps, RecordBuilder recordBuilder) { -- MapEncoder mapEncoder = this.encoderGetter.apply(object); -+ MapEncoder mapEncoder = (MapEncoder) this.encoderGetter.apply(object); // Paper - decomp fix - return mapEncoder.encode(object, dynamicOps, recordBuilder); - } - diff --git a/src/main/java/net/minecraft/network/chat/ComponentUtils.java b/src/main/java/net/minecraft/network/chat/ComponentUtils.java index b6506e881ef337bfd2a7a0644296b48b7300a0f6..7daca712816a79cc4a30b084afbd3d07b5d3755f 100644 --- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java -- cgit v1.2.3