Skip to content

Instrument component isn't serialized when packetevents is loaded #1563

Description

Describe the bug
On 26.2, goat horns sent to the client are missing the instrument component for specific instruments such as admire, this causes the dreaded itemstack hash mismatch which causes the item to rubberband in the inventory.

Software brand
Folia 26.2

Version
packetevents-spigot-2.13.0 from modrinth

Plugins
Packetevents

How To Reproduce
/give minecraft:goat_horn[instrument="minecraft:admire_goat_horn"]
For some reason it only breaks with admire
Shows on client side as ponder

Packet events loaded:
Serverside nbt: minecraft:goat_horn[instrument="minecraft:admire_goat_horn"]
Clientside nbt: {count:1,id:"minecraft:goat_horn"} (missing instrument)

Packet events unloaded:
Serverside nbt: minecraft:goat_horn[instrument="minecraft:admire_goat_horn"]
Clientside nbt: {components:{"minecraft:instrument":"minecraft:admire_goat_horn"},count:1,id:"minecraft:goat_horn"}

Expected behavior
Horn nbt should not change when passing through packetevents
In fact, no nbt should change simply by being deserialized by packet events, there are probably other instances of this that I have not discovered, some way to validate packetevents isnt mutating nbt would be a good addition

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions