aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0006-MC-Dev-fixes.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2023-03-14 13:27:18 -0700
committerGitHub <[email protected]>2023-03-14 21:27:18 +0100
commitbacf389fc35e045f1daa6b8b038ec9e733e1d494 (patch)
treecb166a1b31747beee60da3730df1a11fa3186f6d /patches/server/0006-MC-Dev-fixes.patch
parent9dccea73fb32f84854c6c9e2b27673f7b95b9afc (diff)
downloadPaper-bacf389fc35e045f1daa6b8b038ec9e733e1d494.tar.gz
Paper-bacf389fc35e045f1daa6b8b038ec9e733e1d494.zip
Use adventure serializer when serializing an adventure component in a codec (#8967)
Diffstat (limited to 'patches/server/0006-MC-Dev-fixes.patch')
-rw-r--r--patches/server/0006-MC-Dev-fixes.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/patches/server/0006-MC-Dev-fixes.patch b/patches/server/0006-MC-Dev-fixes.patch
index e16edb7801..1f1f827aa2 100644
--- a/patches/server/0006-MC-Dev-fixes.patch
+++ b/patches/server/0006-MC-Dev-fixes.patch
@@ -106,6 +106,19 @@ index 2f66abf62d303342f5fe614fb3e35e7844497ffc..b346fa94b23d81da7da073f71dd12e67
}
}
+diff --git a/src/main/java/net/minecraft/util/ExtraCodecs.java b/src/main/java/net/minecraft/util/ExtraCodecs.java
+index 6dede9fb8ce33e6f7a6a6d06789d9638ce8c579d..128353b6cad685689403bd1757cc9cc7cc1091d1 100644
+--- a/src/main/java/net/minecraft/util/ExtraCodecs.java
++++ b/src/main/java/net/minecraft/util/ExtraCodecs.java
+@@ -227,7 +227,7 @@ public class ExtraCodecs {
+ }, (pair) -> {
+ return ImmutableList.of(leftFunction.apply(pair), rightFunction.apply(pair));
+ });
+- Codec<I> codec3 = RecordCodecBuilder.<Pair>create((instance) -> {
++ Codec<I> codec3 = RecordCodecBuilder.<Pair<P, P>>create((instance) -> { // Paper - decompile fix
+ return instance.group(codec.fieldOf(leftFieldName).forGetter(Pair::getFirst), codec.fieldOf(rightFieldName).forGetter(Pair::getSecond)).apply(instance, Pair::of);
+ }).comapFlatMap((pair) -> {
+ return combineFunction.apply((P)pair.getFirst(), (P)pair.getSecond());
diff --git a/src/main/java/net/minecraft/util/SortedArraySet.java b/src/main/java/net/minecraft/util/SortedArraySet.java
index 2dc801061025888192c3bf2c4c38b928c16a0165..ca788f0dcec4a117b410fe8348969e056b138b1e 100644
--- a/src/main/java/net/minecraft/util/SortedArraySet.java