TestMod3
TestMod3 copied to clipboard
[1.16.x] CapabilityContainerListener system doesn't work properly for player inventory
@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.
MinecraftForge/MinecraftForge#7630 would remove the need for this system.