[1.9.4] Dynamic tool names need to be generated client-side
SilentChaos512 opened this issue ยท 1 comments
Recently, I tried to update Silent Lib to use the non-deprecated, client-side I18n for localization. This proved to be a big problem for Gems, which is generating tool names on both sides (see #44). The crash itself was fixed (for now) by switching back to the old I18n in Silent Lib. This has no negative side effects right now.
However, this will prove to be a problem in the future. For starters, the old I18n will likely be removed completely in the future. That's not an immediate concern. The big problem is what happens when Gems gets localized for other languages. For example, Chinese players may receive tools with English names, even when the crafting table's output slot shows otherwise.
Suggested fix is to generate tool/armor names client-side and send them to the server somehow. GuiRepair (anvil GUI) made hold some clues. I made be able to generate names in the ItemCraftedEvent handler in GemsCommonEvents. Generate the name there on the client-side, send a packet to the server. Hopefully it will be that easy.
No fix required for tools generated for creative tabs or JEI. Those are client-side only already.