The bug
When using the /enchant
command on an item that that command will fail on, the error message will contain the item's name in the server's language, not in the client's language.
To reproduce
Player 1 opens a world to LAN
Player 1 sets language to Deutsch (Deutschland)
Player 2 joins the LAN world
Player 2 sets language to English (US)
Player 2 runs
/give @s diamond_ore
Player 2 selects the diamond ore
Player 2 runs
/enchant @s silk_touch
→ ❌ The following error message is displayed:Diamanterz cannot support that enchantment
Other commands might potentially be affected as well, though I wasn't able to find any other feedback messages that are.
For commands, this behaviour is the only known way to flatten from JSON text components to plaintext, which also makes it the only known way to parse strings (by constructing flattened text and doing a binary search).
Hate to advocate for a bug, but a lot of stuff indirectly relies on this. It would be nice if this could be kept until some alternative (e.g: `/data ... append` working for strings) was available.
Here's a utilities library that makes extensive use of the trick, for reference: https://github.com/McTsts/Minecraft-String-Utilities