From 7e15d977ecce23ee72b059e9be292d983a336c50 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Tue, 12 Dec 2023 13:44:09 -0800 Subject: [PATCH] Remove no longer needed diff from adventure patch --- patches/server/0010-Adventure.patch | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index f3f2b582d7..294a57f61f 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -2245,33 +2245,6 @@ index 887b9fd625aa23c4ec828a175d63695f915232d3..8152420b9c3eb1bf13c012dd43505d99 + } + // 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 d3a80d0a23be762c05931ae8001d98e43cab2b4a..e0037b99838519eee5fb6f7e95ffaad252f08baf 100644 ---- a/src/main/java/net/minecraft/network/chat/Component.java -+++ b/src/main/java/net/minecraft/network/chat/Component.java -@@ -1,6 +1,7 @@ - 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; -@@ -277,6 +278,14 @@ public interface Component extends Message, FormattedText, Iterable { - } - - 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 49138ccda0f378b13c7f425be765876eb4026b06..ca662b668177532a73e7e309bb8b0fb3c4e310f1 100644 --- a/src/main/java/net/minecraft/network/chat/ComponentSerialization.java