ViaBackwards icon indicating copy to clipboard operation
ViaBackwards copied to clipboard

Fix wrong name of item when use hover "show_item"

Open Elikill58 opened this issue 3 years ago • 1 comments
trafficstars

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.

Elikill58 avatar Jul 14 '22 09:07 Elikill58

For legacy<-> component conversion, please use the ChatRewriter class 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

Elikill58 avatar Jul 20 '22 18:07 Elikill58

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

kennytv avatar Sep 28 '22 18:09 kennytv