tr7zw/ItemSwapper

[BUG] Swapping the last item out of a shulker box creates an empty shulker box with an nbt tag.

Malachi-lewis opened this issue · 1 comments

Version information

itemswapper-fabric-0.5.3-mc1.20.1

Other relevant installed mods

fabric-carpet-1.20-1.4.112+v230608

Expected Behavior

In vanilla, when you empty a shulker box and break it, it drops with no NBT tags. This allows them to stack together with freshly crafted ones when you have carpet mod stackable shulker boxes enabled.

Actual Behavior

When you use ItemSwapper to empty a shulker box without placing it, it leaves behind an empty NBT tag, making it unable to stack with normal shulker boxes unless you break and replace it.

Reproduction Steps

Have a shulker box in your inventory with 1 stack of items in it.
2.
Use ItemSwapper to take the item out.
3.
Check its NBT tags. It will say that it has 1 tag.
4.
If you have carpet mod StackableShulkerBoxes enabled, try to stack it with a freshly crafted shulker. It won't work.

Render engine

  • Vanilla
  • Sodium(optionally with Iris)
  • Optifine
  • VulkanMod
  • Canvas
  • Other

Additional information

I'm also using Sodium and Lithium.

tr7zw commented

UHHH hm. I was semi sure only freshly crafted shulkers have no tags, and once they have been placed/contained items they have a tag?
Edit, while still writing: Vanilla 1.20.4, placing a shulker and breaking it gives it an nbt tag. That's probably carpet mod cleaning the tag to make the stacking work. Now I'm unsure if I should fix that, since that would add potentially weird behavior that isn't expected from the mod, and complicate logic?