ViaBackwards
ViaBackwards copied to clipboard
Fix wrong name of item when use hover "show_item"
Fix #449 with wrong value when using show_item in chat.
Also, I'm sorry for the switch/case, but I didn't find chat color method as spigot to get with the name. Hope it's fine.
For legacy<-> component conversion, please use the
ChatRewriterclass in the 1.13->1.12 ViaVersion protocol package. Please also make sure you use spaces and don't replace any of the existing code with tabs
Hi, thanks for your review.
For space/tab, I'm sorry, I just fix it.
For the ChatRewriter, I tried when I see it few line before, but I got the error: com.viaversion.viaversion.libs.gson.JsonParseException: Don't know how to turn $.tag into a Component when doing ChatRewriter.HOVER_GSON_SERIALIZER.deserializeFromTree(jsonItem). So, maybe I'm not using the good method, but sadly there is no javadoc
This is definitely doing too much manual json object handling where it should either simply be parsed using adventure or only touched where necessary; but I'm not convinced this needs fixing anyways, see https://github.com/ViaVersion/ViaBackwards/issues/449#issuecomment-1261325119
Sorry to point that out this late, but thanks for putting effort into this anyways