Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Fix placeable/destory keys deserialization from spigot

Open Machine-Maker opened this issue 4 years ago • 9 comments

Fixes #6689

Machine-Maker avatar Oct 02 '21 21:10 Machine-Maker

Somethings else to consider regarding the representation of those tags in Bukkit: Minecraft stores these tags in a list (duplicates are not filtered, order is preserved), whereas this CraftMetaItem implementation seems to put them into an unordered HashSet. So a back and forth conversion from Minecraft -> Bukkit -> Minecraft might result in those tags being reordered, potentially affecting the comparisons of Minecraft items. Maybe it makes sense to store these tags in a List in Bukkit as well. Or at least store them in a LinkedHashSet. Or enforce a particular order, similar to how enchantments are reordered in Paper.

blablubbabc avatar Oct 03 '21 09:10 blablubbabc

Somethings else to consider regarding the representation of those tags in Bukkit: Minecraft stores these tags in a list (duplicates are not filtered, order is preserved), whereas this CraftMetaItem implementation seems to put them into an unordered HashSet. So a back and forth conversion from Minecraft -> Bukkit -> Minecraft might result in those tags being reordered, potentially affecting the comparisons of Minecraft items. Maybe it makes sense to store these tags in a List in Bukkit as well. Or at least store them in a LinkedHashSet. Or enforce a particular order, similar to how enchantments are reordered in Paper.

Yeah, I just handled that by changing the fields on CraftMetaItem to lists, but the API still returns a set.

Machine-Maker avatar Oct 04 '21 23:10 Machine-Maker

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 15 '21 03:12 stale[bot]

Rebased for 1.18.1

Machine-Maker avatar Dec 15 '21 04:12 Machine-Maker

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 13 '22 11:02 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 18 '22 18:04 stale[bot]

Rebased for 1.18.2

Machine-Maker avatar Apr 22 '22 01:04 Machine-Maker

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 22 '22 22:06 stale[bot]

This issue has been automatically closed because it has not had activity in a long time. If the issue still applies to the most recent supported version, please open a new issue referencing this original issue.

stale[bot] avatar Jul 02 '22 00:07 stale[bot]

Not applicable anymore

Machine-Maker avatar Jul 16 '24 23:07 Machine-Maker