mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Remove no longer needed diff from adventure patch
This commit is contained in:
parent
480f2aab54
commit
342ba71d4c
1 changed files with 0 additions and 27 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue