mojira.dev
MC-170355

Item in /enchant fail feedback is translated to server instead of client language

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

  1. Player 1 opens a world to LAN

  2. Player 1 sets language to Deutsch (Deutschland)

  3. Player 2 joins the LAN world

  4. Player 2 sets language to English (US)

  5. Player 2 runs /give @s diamond_ore

  6. Player 2 selects the diamond ore

  7. 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.

Linked issues

Comments 4

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

Confirmed in 1.16-pre2.

Confirmed in 1.16-pre5.

Confirmed in 1.20-pre5

violine1101

(Unassigned)

Confirmed

Platform

Low

Accessibility, Commands

1.15.2, 1.16 Pre-release 2, 1.16 Pre-release 5, 1.19.3, 23w03a, 1.19.4, 1.20 Pre-release 5

Retrieved