lishid / OpenInv

Open anyone's inventory as a chest, real-time!
GNU General Public License v3.0
120 stars 97 forks source link

SilentChest crashes client on Cauldron/Kauldron #53

Closed Jikoo closed 7 years ago

Jikoo commented 7 years ago

http://pastebin.com/iUzLpAyG

The issue seems to be that the packet updating the Player's inventory is sending the wrong size list. It's likely due to mods that add additional player inventory slots, and I don't think there's much we can do about it. The only thing that springs to mind is using reflection to add the slot listener and manually sending the inventory contents packet so as to avoid sending the packet to update the player's inventory contents.

The real problem is that it's inconsistent. Initially I was able to crash my client immediately, but later on I was not able to reproduce it. There's more, too. Initially, AnyChest worked perfectly. Now SilentChest works, but every single chest is detecting itself as being blocked, so AnyChest is required. The only change I made was installing Essentials and adding a command that updates your inventory. I uninstalled Essentials and reverted the change, and it still works the same way.

I'll leave this open for a little because it does bother me that things aren't working right, but I think the end conclusion is gonna be that Cauldron is flat out buggy and NMS-based plugins can't be expected to function properly.

Jikoo commented 7 years ago

Actually, it looks like using reflection to get the next container counter was possibly the issue. Why did we even use reflection to grab and increment it? The method for that is visible all the way back to 1.4.5.