YABBA icon indicating copy to clipboard operation
YABBA copied to clipboard

[1.1.2.54] AntiBarrel duplication/ghost item glitch

Open PolyacovYury opened this issue 5 years ago • 1 comments

FTBLib: 5.4.7.0 Forge: 2847

Related to #108. Basically, if you put a shulker box with items inside (or, as I tested, an enchanted sword also works) - you can't take it out through the GUI. If you don't press Shift and left-click it - you get a ghost item that disappears if you close the GUI. If you hold Shift and left-click it - you sometimes get a copy of the actual item, but the original item stays in the AntiBarrel, sometimes you also get a ghost item. Taking the item out with a hopper works and also seems to fix the issue.

Debugging shows that when MessageAntibarrelClickSlot.onMessage() calls ContainerAntibarrel.onClick(), it sends a newly created ItemEntry as first argument. tile.contents.items is a LinkedHashMap, which seems to rely on entry given to the remove function being exactly the same as the one stored. Since they don't match - the entry doesn't get removed from actual barrel's contents.

PolyacovYury avatar Sep 20 '20 15:09 PolyacovYury

Did some research.
The issue only presents itself if you shift-click a held item into an Anti-Barrel with AstralSorcery installed.
Cause: AS changes its AmuletHolder capability every tick. The held item's capsNBT changes - it has current player's UUID now. Shift-clicking an item doesn't fire AS' removal of that UUID, while an item "held" in the UI does have it removed.

PolyacovYury avatar Oct 13 '20 04:10 PolyacovYury