mega12345mega / NBT-Editor

Edit items, blocks, and entities in-game.
MIT License
46 stars 14 forks source link

Opening the client chest kicks you from some servers #41

Closed HyperSoop closed 1 year ago

HyperSoop commented 1 year ago

Opening the client chest on some servers causes an index out of bounds error, i'll attack a log in a bit. (This should not depend on the server at all, it's in the name, what's going on?)

mega12345mega commented 1 year ago

Without a log it is hard to be sure, but my current guess is that the server is sending item packets to unusual slots. The mod has to do some sketchy math to update the client chest when picking up items while the server doesn't know that the chest is open. It is possible some slot isn't properly handled, causing it to write to an invalid location.

HyperSoop commented 1 year ago

I forgot to reproduce and send the log lol

mega12345mega commented 1 year ago

Have you had a chance to get a log? Thanks.

HyperSoop commented 1 year ago

aaaaa i should force myself to try and replicate it

HyperSoop commented 1 year ago

There doesn't appear to be a log message for somer reason. 2023-03-29_08 46 50

HyperSoop commented 1 year ago

Steps to reliably reproduce:

mega12345mega commented 1 year ago

I've had a chance to replicate the issue. It appears that the server is sending a slot update packet for slot id 0 and sync id 0, which is breaking the client chest menu things. I'm currently figuring out what this is supposed to correspond to. In the meantime, you could use /nbt export file to get items to and from the server.

mega12345mega commented 1 year ago

I've just released v1.11.0, which fixes this! I eventually decided to discard the invalid packet from the server, since it didn't seem to correspond to anything anyway.