Thaumic Augmentation

Thaumic Augmentation

7M Downloads

Morphic Tool EnderIO Compat [Bug]

catemiko opened this issue ยท 3 comments

commented

If you infuse EnderIO tools with Morphic Tool infusion EnderIO upgrades would be lost despite NBT tags saving.
image
image

commented

Im not sure about all upgrades, but after morphing Direct upgrade doesnt work.

commented

So the issue is that I only copy certain parts of the item's NBT tag (namely enchantments). The reason I don't just copy the entire tag is that I would have to monitor the fake item for changes to its NBT, as I would need to make sure the tags on the morphic tool and the internal item are in sync. This would probably be doable, albeit a bit ugly because it would pretty much make every item callback require this check.

tl;dr I'll probably work on it eventually, below is just an explanation for why I use fake items instead of real ones:

As for why I have fake items in the first place: the alternative would be swapping out the actual item, and just storing some NBT or something that says it's the morphic tool. This works great for things like the Akashic Tome and Morph-O-Tool, but not so much for the case of allowing any item because an item can do any of the following to its ItemStack:

  • Delete its own NBT tag
  • Set its stack size to 0, yeeting itself out of existence
  • Change the item pointed to by the stack
commented

So the new version I just uploaded now copies the full NBT data, so everything should work. I'm going to revisit handling NBT in general in the future, as keeping it in sync with the item is a little more involved.