[SPIGOT-7735] SkullMeta serialization fails if both profile and note block sound are set Created: 09/Jun/24 Updated: 25/Dec/24 Resolved: 09/Jun/24 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Gadse | Assignee: | blablubbabc |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | SkullMeta, serialization | ||
| Environment: |
Spigot 1.20.6, Spigot 1.20.4, Spigot 1.20 |
||
| Attachments: |
|
| Version: | This server is running CraftBukkit version 4189-Spigot-fcd94e2-fd2f418 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) |
| Guidelines Read: | Yes |
| Description |
|
The following is tested on the (at the time of writing) latest BuildTools built revisions for 1.20.6, 1.20.4 and 1.20.1. Only one plugin to create the item and test serialization/deserialization was running. Testing lower versions does not make sense as the note block tag was added in 1.20. Creating a player head item and saving it to YAML comes with the following issue: If the new note block sound tag is set, Spigot writes a note block tag during serialization,
If just the profile/owning player is set, serialization works as expected. If the profile/owning player and the note block sound are set, Spigot writes only the profile tag during serialization and does not write the note block sound. On 1.20.6, an "unhandled" tag is written as well. Attached you may find a plugin to test this with. Use /itemboth to get a player head with a profile and a noteblock sound. Use /itemsound to get a player head with a noteblock sound. Use /itemprofile to get a player head with a profile. Use /serialize to display the serialized config in chat. The source to it has been attached as well for convenience. |
| Comments |
| Comment by Gadse [ 09/Jun/24 ] |
|
Totally missed that return when reading it myself, thanks for being so quick about it! Should I create a new issue for the unhandled tag? As you said, it's out of scope of the issue title/core. |
| Comment by blablubbabc [ 09/Jun/24 ] |
|
Seems like CraftMetaItem.HANDLED_TAG is missing an entry for CraftMetaSkull.NOTE_BLOCK_SOUND. Also, I briefly experimented with the provided test plugin, and trying to deserialize the item on 1.20.6 results in a crash (NRE), likely due to:
Will prepare a fix. |