From ebf79559964068292728f34b9de5b2802b9717b8 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: [PATCH] [ci skip] move decomp fixes to correct patch --- patches/server/Adventure.patch | 18 ------------------ patches/server/MC-Dev-fixes.patch | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/patches/server/Adventure.patch b/patches/server/Adventure.patch index 15ddbb0164..dc7d658f69 100644 --- a/patches/server/Adventure.patch +++ b/patches/server/Adventure.patch @@ -2307,24 +2307,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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); -@@ -0,0 +0,0 @@ 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 - } - } - -@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java diff --git a/patches/server/MC-Dev-fixes.patch b/patches/server/MC-Dev-fixes.patch index 0f53a2bce7..0f908d93d2 100644 --- a/patches/server/MC-Dev-fixes.patch +++ b/patches/server/MC-Dev-fixes.patch @@ -52,6 +52,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/network/chat/ComponentSerialization.java ++++ b/src/main/java/net/minecraft/network/chat/ComponentSerialization.java +@@ -0,0 +0,0 @@ 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 + } + } + +@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java