Animal Net: Save Forge Capabilities
maxanier opened this issue ยท 8 comments
The Animal Net code uses Entity#writeEntityToNBT
to store the captured entity as far as I can tell. Unfortunately this does not include any Forge Capabilities attached to that creature.
This causes issues with other mods like Vampirism (TeamLapen/Vampirism#167). Vampirism stores a blood value in a Forge Capability. If the creature is caught in the net and released again that blood value is lost.
Easiest solution might be to use Entity#writeToNBT
which stores all relevant information including capabilities, but also a lot of unnecessary information.
I'll take a look into it. Thanks for looking into it.
I was trying to save on the amount of data I saved in the tile entities, but capabilities are kinda important.
I realized why I didn't add this in before because I share code with my eggs, and the eggs dont need any of that information cause it hatches a new entity. but I rewriting it to include all information. which tbh I should have done before, but I wasn't thinking about all that.
@GenDeathrow this issue is still present in some of the most recent builds of the relevant mods, at least as applied to Vampirism's blood data. I have already asked Max to ensure he's done everything he needs to for the NBT to be saved, but he seems fairly certain it's still on your side of the fence. Did you fall into the void while working on this ๐?
I didn't drop into the void, just RL stuff has taken the drivers seat for a bit. Im planing on getting back into things full swing. This is absolutely on my side, I didnt' save all the nbt data because it ran into issues with uuid of the animals getting duped and immediately killing the entity, but some of that code has changed and I will look into it again.
So my bad, it looks like I tried to add this capability in last time, but I missed some old code when I refactored to make future changes easier. so when picking up entities it still wasn't saving full data.