Why shouldn't the client care, the List<Tarot> toRead is the list of stuff that's gonna be rendered on the Gui. Or do you mean I shall find entityPlayer and also the List<Tarot> in handler and then just send the toRead List back to the client? that kinda make sense.
But where in code would I call my network.sentTo(new ThisMessage(...)) to send this packet though? The constructor doesn't make sense because it's also called on the client side, do i send the packet to client when the getServerGuiElement in my GuiHandler?
1) Where can I download them?
2) I figured out myself that I am using the incorrect Java version but I cannot figure out how to install Java 8 probably. I got the folder but it is not recognised by Java as a version.
For the client.
The client shouldn't care.
Once you get it.
I'm not sure what you mean by this. When do you get the information? You can do it in the constructor that takes a player.
To the client.
You'd schedule it via Minecraft#scheduleTask and then you would get the openContainer field from the client player Minecraft#player. If the openContainer is an instanceof your Container. Then take the data out of the message and put it in the openContainer.
This would just be a waste of packets. The server knows that a gui is opening and the uuid of the player in question and therefore is fully capable of sending the packet it needs.
@Animefan8888 Honestly still kinda confused but lemme try to word this:
1. Keep the constructor that uses entityplayer like i posted above.
2. Another Container constructor? (still not sure for what?)
3. Send packet from server to client with the rng info, but
#1. what do i do with my registry filter part that also needs my player?
#2. sure i can process the stuff on the server, but how when would i even send that packet and where do i let the server do the work? so confused.
#3. Where would i send that packet, like what would be in the handler?
I really tried reading the forge docs and still don't quite understand how to utilize the packets to open gui. All i can see by debug mode and breaks are:
1. When i right click to open the gui, the server calls getServerGuiElement and successfully gets the gui.
2. but when the client calls getClientGuiElement and i return a new GuiTarotTable(new ContainerTarotTable(...)) it renders nothing because findPlayer returns null.
I thought I need to send a packet at getClientGuiElement from client to server with the UUID and get entityPlayer inside the Message Handler. And then, another packet need to be sent back with the entityPlayer or at least the RNG result and the filtered List<Tarot>, but what would i do with the message is what I'm mostly confused with.
Sorry for the word wall, I've had this bug for days and kinda frustrating that I have no clue how to fix it
really appreciate your help!