TestMod3 icon indicating copy to clipboard operation
TestMod3 copied to clipboard

[1.16.x] CapabilityContainerListener system doesn't work properly for player inventory

Open Choonster opened this issue 4 years ago • 1 comments

@Tavi007 found in this thread that the CapabilityContainerListener system doesn't properly update items in the player inventory until they're moved.

This seems to be caused by Forge patching Container#detectAndSendChanges to only call IContainerListener#sendSlotContents if a slot's Item, count or share tag has changed; which often won't be the case for capability-only updates.

This change was actually introduced in August 2017 for 1.12.2 (in MinecraftForge/MinecraftForge#4252), six months after I created my system. I thought it was working more recently than that, but I must not have tested it properly.

I need to see if there's any way around this.

Choonster avatar Dec 08 '20 12:12 Choonster

MinecraftForge/MinecraftForge#7630 would remove the need for this system.

Choonster avatar Feb 13 '21 02:02 Choonster