Closed falseresync closed 1 month ago
I assume this has something to do with the validation on slots that LibGui does, but I don't have any idea what to even search for
Not a bug. The vanilla Slot
instances that hold the stacks on the client are created by the WItemSlot
widget, but the clientside constructor in AutomatonGui
doesn't add any widgets to the gui.
You probably want to make the server-side ctor a "primary" constructor and just call this()
in the client-side one.
Thanks! It toootally didn't sneak past me that all of the ScreenHandlers call this()
in these scenarios xD
I have an entity with an inventory, and I made it open a HandledScreen on interaction:
I have a barebones Gui from the example:
Both the Gui and the Screen are registered properly
This results in an
IndexOutOfBoundsException
fromInventoryS2CPacket
handling. I have no clue what is wrong, given that vanilla screens work fine, like, for exampleGenericContainerScreenHandler.createGeneric9x1(syncId, playerInventory);
ornew HopperScreenHandler(syncId, playerInventory, inventory)
From the DEBUG log: