mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
[ci skip] move decomp fixes to correct patch
This commit is contained in:
parent
6e3d7add28
commit
ebf7955996
2 changed files with 22 additions and 18 deletions
|
@ -2307,24 +2307,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
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);
|
||||||
@@ -0,0 +0,0 @@ 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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
--- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
||||||
|
|
|
@ -52,6 +52,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
|
|
||||||
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 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<? 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
--- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
||||||
|
|
Loading…
Reference in a new issue