geforkt von Mirrors/Paper
Remove no longer needed diff from adventure patch
Dieser Commit ist enthalten in:
Ursprung
480f2aab54
Commit
342ba71d4c
@ -2245,33 +2245,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/Component.java b/src/main/java/net/minecraft/network/chat/Component.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/Component.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/Component.java
|
||||
@@ -0,0 +0,0 @@
|
||||
package net.minecraft.network.chat;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
+import io.papermc.paper.adventure.AdventureComponent; // Paper
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
@@ -0,0 +0,0 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
|
||||
}
|
||||
|
||||
public JsonElement serialize(Component ichatbasecomponent, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||
+ // Paper start - hack before proper nbt serialization is added
|
||||
+ if (ichatbasecomponent instanceof io.papermc.paper.adventure.AdventureComponent adventure) {
|
||||
+ final @Nullable Component converted = adventure.deepConvertedIfPresent();
|
||||
+ if (converted == null) {
|
||||
+ return net.kyori.adventure.text.serializer.gson.GsonComponentSerializer.gson().serializeToTree(adventure.adventure$component());
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end - hack before proper nbt serialization is added
|
||||
return Component.Serializer.serialize(ichatbasecomponent);
|
||||
}
|
||||
}
|
||||
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
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren