TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Opening a vessel and then switching slot, on server, crashes the client

alcatrazEscapee opened this issue ยท 0 comments

commented

Discrepancy happens because the server sends a packet to the client to open a slot, by hand. It doesn't check the exact slot, and so a vessel ends up with an empty vessel here:

which then later crashes in render

latest (9).log

Fix

We need to send the actual slot, and make sure we check that slot on client. The client is free to change their selected slot away from main hand, as the container opens, so long as they don't remove the container itself. In that case, we need to not crash, but also just immediately fail to open the GUI.

Reproduction Notes

This is quite finicky to reproduce, but the best way I've found: have a vessel in the hotbar, and nothing else. Randomly scroll the mouse wheel and right click constantly (may require two hands). Eventually you hit the right combination of vessel and movement, on a dedicated server, to cause a client side crash.