mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 17:07:34 +01:00
[ci skip] move decomp fixes to correct patch
This commit is contained in:
parent
7c2dc4b342
commit
0fadaed078
@ -52,6 +52,28 @@ index bfac303dc0c11a0e741b29f3700823c69e55c798..ac1aa37329bd4d411964ea34ea8147f6
|
|||||||
|
|
||||||
public static final int NOT_REGISTERED = -1;
|
public static final int NOT_REGISTERED = -1;
|
||||||
private final String id;
|
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<? extends T> mapDecoder : this.codecs) {
|
||||||
|
DataResult<? extends T> dataResult = mapDecoder.decode(dynamicOps, mapLike);
|
||||||
|
if (dataResult.result().isPresent()) {
|
||||||
|
- return dataResult;
|
||||||
|
+ return (DataResult<T>) dataResult; // Paper - decomp fix
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -96,7 +96,7 @@ public class ComponentSerialization {
|
||||||
|
}
|
||||||
|
|
||||||
|
public <S> RecordBuilder<S> encode(T object, DynamicOps<S> dynamicOps, RecordBuilder<S> recordBuilder) {
|
||||||
|
- MapEncoder<T> mapEncoder = this.encoderGetter.apply(object);
|
||||||
|
+ MapEncoder<T> mapEncoder = (MapEncoder<T>) 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
|
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
|
index 13c8051da164bed579fbda44af059a36b8f00a0e..b6506e881ef337bfd2a7a0644296b48b7300a0f6 100644
|
||||||
--- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
--- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
||||||
|
@ -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
|
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
|
--- a/src/main/java/net/minecraft/network/chat/ComponentSerialization.java
|
||||||
+++ b/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 {
|
@@ -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 Codec.either(Codec.either(Codec.STRING, ExtraCodecs.nonEmptyList(selfCodec.listOf())), codec).xmap((either) -> {
|
||||||
return either.map((either2) -> {
|
return either.map((either2) -> {
|
||||||
return either2.map(Component::literal, ComponentSerialization::createFromList);
|
return either2.map(Component::literal, ComponentSerialization::createFromList);
|
||||||
@@ -86,7 +113,7 @@ public class ComponentSerialization {
|
|
||||||
for(MapDecoder<? extends T> mapDecoder : this.codecs) {
|
|
||||||
DataResult<? extends T> dataResult = mapDecoder.decode(dynamicOps, mapLike);
|
|
||||||
if (dataResult.result().isPresent()) {
|
|
||||||
- return dataResult;
|
|
||||||
+ return (DataResult<T>) dataResult; // Paper - decomp fix
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -96,7 +123,7 @@ public class ComponentSerialization {
|
|
||||||
}
|
|
||||||
|
|
||||||
public <S> RecordBuilder<S> encode(T object, DynamicOps<S> dynamicOps, RecordBuilder<S> recordBuilder) {
|
|
||||||
- MapEncoder<T> mapEncoder = this.encoderGetter.apply(object);
|
|
||||||
+ MapEncoder<T> mapEncoder = (MapEncoder<T>) 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
|
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
|
index b6506e881ef337bfd2a7a0644296b48b7300a0f6..7daca712816a79cc4a30b084afbd3d07b5d3755f 100644
|
||||||
--- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
--- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
||||||
|
Loading…
Reference in New Issue
Block a user