emilyploszaj / emi

A featureful and accessible item and recipe viewer
MIT License
220 stars 46 forks source link

Support for NeoForge Attachments #475

Closed pupnewfster closed 2 months ago

pupnewfster commented 3 months ago

1.1.1+1.20.4 (and I believe I had the issue when on 1.1.3 as well)

It seems that while attachments are copied in ItemEmiStack#copy thanks to calling the ItemStack#copy method, the way the data of the stack is persisted and recreated in EmiStackSerializer leaves out the separate attachment based NBT that NeoForge adds. For ItemStack#save and ItemStack#of, neo makes the attachments get saved to the nbt, but it doesn't cause it to get serialized to nbt every single call to getTag. I noticed this issue while investigating why the filled variants of Mekanism's items were not displaying in EMI even after defining comparisons for the stacks. I don't know quite how urgent this issue is, given while in 1.20.4 it doesn't work, I presume in 1.20.5 with the move away from raw NBT and to Components this will just be fixed natively.

emilyploszaj commented 3 months ago

I support 1.19.2 to modern, and I imagine this is an issue on forge as well, so it will have to be fixed. I'm very surprised it hasn't been noticed until now, but I suppose that's just because serialization is only really used for favoriting.

pupnewfster commented 3 months ago

Attachments are a NeoForge 1.20.3 and 1.20.4 concept, that might go away in 1.20.5 in favor of mojang's components.

emilyploszaj commented 3 months ago

Hm, after looking into more how much would be required to support this, I might put it on the backburner. 1.20.4 is a pretty dead version which I imagine will be replaced by 1.20.5 pretty quickly. I'll keep tracking on the issue if I take a proper stab at this.

emilyploszaj commented 2 months ago

Nope, neo is moving away from this in 1.20.5