Astral Sorcery

Astral Sorcery

63M Downloads

Amulet Holder Tag causing issues with item stacking

phit opened this issue ยท 18 comments

commented

Get a stack of cobblestone and drop a few on the ground, scroll to a different slot on your hotbar and go pick them up, you will have 2 stacks of cobble in your inventory and they don't merge due to the extra NBT added to any items the player interacts with by AS

as you know this feature also causes a lot of issues with various mod machinery and recipes https://github.com/HellFirePvP/AstralSorcery/issues?q=is%3Aissue+Amulet+is%3Aclosed

running astralsorcery-1.15.2-1.12.4 in All The Mods 5

Not sure what I'm exactly going for with this issue and I'm not sure if there would be any way to achieve the result without attaching NBT to random items, but in its current state the side effects are really annoying for just general inventory management. So maybe there's a chance you will rethink this feature.

commented

And something is interacting to cause that behavior in inventory. That's not normal.

commented

Mh, should have tested first, my bad. I'll see if I can find the mod responsible. Thanks for the swift reply!

commented

Does it happen outside of creative mode?

commented

welp, nvm. I just reproduced the cobble issue with just your mod.

observerlib-1.15.2-1.2.0.v60.jar
astralsorcery-1.15.2-1.12.4.jar
curios-FORGE-1.15.2-2.0.2.6.jar

https://phit.link/s/2020-08-09_01-26-03.webm

commented

That was spawned into inventory tagless. It was never considered "picked up" by the player, and so was not modified, was my point. This is not possible normally, and if a mod allows it would be bad for a lot of reasons in MC vanilla, much less underlying things like event firing for acquisition that mods may rely upon. This is not a normal scenario.

Also, there isn't another performant method to accomplish the same task.

commented

the stack of 64 at the end is tagless, tags get cleared if you reopen your inventory, even if i drop the whole stack first and then pick it up I can repro it

https://phit.link/s/2020-08-09_01-37-00.webm

commented

@Doomgull
Did my issues gave the reason to re-open this?

Since I gave the NBT data?

AS_Amulet_HolderLeast and AS_Amulet_HolderMost

commented

Ok sorry for not checking, and yea same version as the guy above.

commented

No, I just didn't want multiple tickets and I was busy with work previously.

commented

I applied the update, but the AS_Amulet_HolderLeast and HolderMost tags are still being applied to certain items, seems like only weapons and armor? Just wanted to know if this was intentional or if there's still a bug.

Image of some of the extra NBT -
image

Only happens when the items are in the main hand or off hand, and the tags seem to be removed when taken out of the hand.

Thank you for your work on this.

commented

The entire point of the nbt application.

commented

Thank you for confirming. :)

Just because I'm curious, what does it do?

commented

Thank you! Very cool item, makes sense now what things it would affect and what it would not.

commented

Introduced with 6bef20a not setting the reference flag to false in an incorrect case. derp.

commented

Thanks for the quick fix!

commented

This issue is now in 1.16.4 in AS 1.13.8.

Essentially, every single weapon, tool, or armour that you touch with your main hand or body will have the AS_Amulet_holder NBT tag attached to it. While above, it was said that the tag is removed when removed from the main hand, this is not the case in 1.16.4.1.13.8. The tag does not get removed, and thus makes sorting anything into anything like drawers impossible, without touching everything single one of the objects, like swords from wither skelies, or what have you.

I really wish it would only have the tag when used or held.