Started by
Andygun11
on
Topic category: Help with Minecraft modding (Java Edition)
Code is shown above... It doesn't say functional. and I did a debugging earlier, and even when there's ANY item in it, the procedure always detects it as minecraft:air. I don't understand why it does this. Procedure runs on a GUI's button press.
How is GUI open?
The initial GUI is opened by this code (right clicking on a custom entity):
and then DaveDialogueGUI has a button that does this:
which has a input slot, and the button which runs the code in the original post's image
dont ask about my horrible mod element namingalso, ive tested a bit, and it seems like everything other than executing commands, running other procedures, and opening GUI works. like if i want to play a sound, that works, but then opening a different GUI doesn't, and running "/say functional" doesn't. 2025.1, latest version. i dont know why
ok, scratch what i just said last reply.. it's 100% the GUI slots having a bug. when i take out the IF statement and only run the code within it, it runs completely fine.
I am not sure if slot syncing between server and client runs if gui is not bound to item/entity/block
Is it possible to make the GUI with the slot synced with the entity? Would I just set it's GUI as the DaveDialogueGUI or as DaveDialogueEssenceGUI?
Yes, just select said GUI as GUI in the inventory settings of the entity
It still doesn't work. The GUI still doesn't open. I think this is a bug in MCreator.. Should I put it on the GitHub repo or something?
If GUI is bound to entity, I advise you use entity slot management procedures and not direct GUI slot manipulation procedures
What's the difference?
and btw, like the issue isn't just the slots thing, the GUI that i'm trying to open (when the code in the image in the initial post is true) doesn't open
ok i got it working, i just opted to check the player's inventory instead of making them put the item in any slot