mojira.dev
MC-267451

Items named with an anvil on 1.20.4 don't stack with items named prior

If I'm playing in a world created in Minecraft 1.20.1 or prior that was upgraded to 1.20.4, and I take a piece of paper and name it "SecretPassword," then that item _will not _stack with paper named SecretPassword created on prior versions. This effectively breaks many redstone contraptions as well as datapacks, requiring all filter items to be discarded and replaced with newly renamed items.

The root cause is that, in 1.20.1 and prior, items named via anvil would have their NBT represented as

{display:{Name:'{"text":"SecretPassword"}'}}

whereas in the new version the NBT data is simply:

{display:{Name:'"SecretPassword"'}}

Note that while this is also true for named block entities (chests, hoppers, brewing stands), the process of upgrading the world seems to have converted the names successfully to the new format.

Linked issues

Comments 3

Downgrading features is not supported. When formats change, it's expected they would not stack with items from previous versions. You can rename the items from older versions to follow any new formats.

It's talking about upgrading, not downgrading. It is expected the format on any old data is converted to the new format where applicable (in this case {"text": "NAME"} to just "NAME"; updating formats like this is done properly everywhere else,just not on item names. (eg the sweeping edge ID change was applied correctly to old items).

Thank you for clarifying, sorry for the confusion.

OpenBagTwo

gegy

Confirmed

Platform

Normal

Datafixer

1.20.4

24w09a

Retrieved