When using the /give command in any server, the message in chat uses the host's language.
Notes:
This only happens in the message. The items themselves got the right name
Steps to reproduce:
Change language to french or something
Open to lan
Enter lan from another computer
Use /give coal 1 0 on the other computer:
The item name in the message in chat will be in french
Affects the following feedback:
Item name in
/give
Block name in failed
/testforblock
Code analysis by @unknown can be found in this comment.
Linked issues
relates to 1
Comments 8
Please link to this comment in the description
The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.
The reason for this is that the method net.minecraft.item.ItemStack.getTextComponent()
returns a TextComponentString
instead of a TextComponentTranslation
and therefor uses the language of the server.
Should affect all servers and not only LAN. Please change the summary to "Item name in /give feedback translated in language defined by server instead of client" or something similar
Affects the /testforblock
command as well if the block tested for is not at the provided position. The reason for this is that the method net.minecraft.block.Block.getLocalizedName()
is called which returns the block name as a translated string.
Those messages are generated by the server.