Topic category: Help with Minecraft modding (Java Edition)
Hello!
I am trying to make a GUI that opens by a keypress and lets you store items inside it.
Thank to Sinsamvae I got the idea of storing the items put into the GUI into a player lifetime global itemstack variable.
The issue is that my code does not seem to work and closing the gui then reopening it does not show the items.
(for now I am just working on slot 0 for testing purposes)
I have also tried using the "when slot change starts" trigger to no avail. Using print statements I found out that it does store the correct item when closing the GUI and it goes load the correct item when opening the GUI but it doesn't show the item itself and there are no interactions possible with it. Almost as if it gets overwritten. I also noticed that the print statement is running twice per trigger which might be the cause of this but I don't know why the procedure is being called twice in the first place.
https://imgur.com/a/24oVEyR
I am on the latest version (2025.2.28610) and using neo-forge.
Any help is appreciated!