neoforged / NeoForge

Neo Modding API for Minecraft, based on Forge
https://projects.neoforged.net/neoforged/neoforge
Other
1.05k stars 140 forks source link

[1.21/1.22] Attachment Holders and Codecs #1160

Open robotgryphon opened 3 weeks ago

robotgryphon commented 3 weeks ago

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:

Example 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

robotgryphon commented 3 weeks ago

Related PR for code discussion and changes: #1163