KyoriPowered / adventure-platform

Adventure platform implementations
https://docs.advntr.dev/platform/index.html
MIT License
164 stars 31 forks source link

Gson relocation causes reflection not working #176

Open re-ovo opened 3 weeks ago

re-ovo commented 3 weeks ago

Currently, there are some reflection parts that use the Gson class directly without considering the impact of relocation, which will cause it to not work, such as MinecraftComponentSerializer.

Perhaps make a utility class can be implemented to convert between the relocated Gson and the built-in Gson?

kezz commented 3 weeks ago

I would just consider not shading and relocating GSON.

mbax commented 1 week ago

For folks in such a situation, unable to get out of shading gson or at least needing more time: You can avoid this by doing your shading/relocating of gson as one step and then shading and relocating adventure-platform in a second step.