Some item text components are not correctly upgraded from 1.20.2 to 1.20.4+
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Expected behavior
The text components on the item are correctly upgraded to 1.20.4, regardless of if there is quotes around true/false text components.
Observed/Actual behavior
The item appears to have no name/lore if quotes are present around a true/false. While the quotes were technically still considered incorrect before 1.20.4, older versions were less strict and rendered names and lore fine.
Steps/models to reproduce
On a 1.20.2 server, /give yourself 2 items:
/give @s cookie{display:{Name:'{"text":"Item with quotes on false","color":"yellow","italic":"false"}'}}
/give @s cookie{display:{Name:'{"text":"Item without quotes on false","color":"yellow","italic":false}'}}
Both items should render correctly:
Update that server to 1.20.4, and the item with quotes around false loses it's name completely, while the one without continues to work fine:
Plugin and Datapack List
plugins
[01:38:05 INFO]: Server Plugins (0):
datapack list
[01:38:28 INFO]: There are 2 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)]
[01:38:28 INFO]: There are no more data packs available
Paper version
version
[01:57:25 INFO]: Checking version, please wait...
[01:57:25 INFO]: This server is running Paper version git-Paper-477 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 1207162)
You are running the latest version
Previous version: git-Paper-318 (MC: 1.20.2)
Other
This is an upstream issue with vanilla, but due to the potential for it to damage custom items on servers, I feel that it is within scope for Paper to patch.
I've created a report on Mojang's bug tracker here: https://bugs.mojang.com/browse/MC-270473
It's worth noting that Paper is worse off than vanilla here, as the items that have the now-invalid NBT just get the tag completely stripped rather than it just not rendering the name/lore.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Reproduce the issue with the two /give commands, upgrade from 1.20.2 to 1.20.4, and trace the item text-component upgrade path; done means quoted true/false components retain their item name and lore after upgrading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100