[1.21/1.22] Attachment Holders and Codecs #1160
Labels
1.21
Targeted at Minecraft 1.21
enhancement
New (or improvement to existing) feature or request
request for comments
For gathering opinions on some topic or subject
Been digging around data attachments. Now that data attachments no longer apply to item stacks (since components) and the main concern with item data serialization using codecs was how often item NBT got synced.. can we flatten data attachments to always use codecs?
Some reasoning:
IAttachmentSerializer
in favor of always using codecs is less maintenanceHolderLookup.Provider
in many scenarios -- at least, you'd only deal with that while saving NBT, and that's onAttachmentHolder
and things using itAttachmentHolder.CODEC
support for modder codeExample of a pain point: https://github.com/CompactMods/CompactMachines/blob/83ef9a0daa6162b27d51cd859a39bcdb3fc0621e/neoforge-main/src/main/java/dev/compactmods/machines/data/room/RoomDataAttachments.java#L24-L33
The text was updated successfully, but these errors were encountered: