当玩家将一件物品放进铁砧时,铁砧的GUI界面上的物品名称编辑框会显示物品本身的名称,但是用铁砧合成时客户端会把编辑框内的内容一并发给服务端,不管物品有没有重命名,服务端都会判定合成该物品需要被重命名并且需要消耗额外的经验值(xp),除非上面的名称编辑栏是空的,这个bug就导致了玩家在用铁砧合成物品的时候客户端显示所需的经验值和服务端的不统一,引发物品回弹
When the player puts an item into the anvil, the item name edit box on the GUI interface of the anvil will display the name of the item itself, but the client will send the contents of the edit box to the server when the anvil is synthesized. , regardless of whether the item has been renamed, the server will determine that the item needs to be renamed and requires additional experience points (xp) to synthesize, unless the name edit field above is empty, this bug causes the player to use the anvil When synthesizing items, the client displays the difference between the required experience value and the server, causing the item to bounce back
by Google Translate
Linked issues
Attachments
Comments 5
This doesn't even seem to be Unicode related - BDS seems to only support one language at a time, and any other language isn't properly accounted for by the looks of it.
Yup, just confirmed what I initially suspected: BDS/Realms only runs in one language at a time, so if the client is running in Chinese and BDS is set up in English, BDS will attempt to compare the name the client sent with the English name, and since they're obviously not the same, a custom name will be set.
Item name before enchanting:
[media]Item result in the anvil menu (the client's prediction):
[media]Item result in the main inventory (the server's prediction, now has a custom name):
[media]This is likely also reproduceable with the integrated server, if you invite a friend who has a client set up with a different language versus your own.
— When a player puts an item into the anvil, the name editing box on the GUI of the anvil will show the name of the item itself, but when combining with the anvil, the client will send the name of the item to the server, regardless of whether the item was actually renamed. The server will then decide that the item needs to be renamed and consume additional experience to do so, unless the box above is empty. This bug causes the client and server to have a mismatch when the player creates the item with the anvil, thus causing the action to be reverted.
This issue is likely indirectly caused by how the server authoritative inventory system works with anvils. There is no specific indicator in the
CraftRecipeOptional
stack request action that can be used to determine if the item was renamed or not;FilterStrings
always contains at least a single entry, theFilterTextPacket
is no longer sent as of v1.18.30, and the resolved filter string is always either the item name or the custom item name.Unless the server properly supports every locale that the game supports, there is no way to properly detect if the client intended on a rename or not. This is unrealistic to get exactly right, especially for third party servers including featured servers which may not have mappings for each item and their display names.
Since BDS supports all locales anyway, it likely isn't an issue for it as long as both names are properly compared in a way that is Unicode compatible (likely the issue being seen here) but this is still a fairly major problem for 3P servers.