Started by
creeperkage87
on
Topic category: Help with Minecraft modding (Java Edition)
I'm trying to make a GUI for my first mod. I've got it all set up, including a procedure to show and hide the GUI when the key G is pressed, but when I went to test it out, pressing the G key would completely crash Minecraft. I heard it could be a client/server-side issue, so I made it run on the server, which stopped it from crashing. However, it's still not showing. I'm no longer sure what the issue is, as I've never worked with MCreator before. I don't have any GUI slots; it's just text and buttons.
Edited by creeperkage87 on Sat, 09/27/2025 - 03:21
can you show the procedures and the gui?
Here's the procedure that's called when I press the G key. Its job is to show the GUI for the player:
This is the version that won't crash my game when the G key is pressed, but still doesn't show the GUI.
Here's the GUI as well; it's basically just a mini stats page for now. It's not hooked up to any procedures for testing purposes. The "points" text is supposed to be hooked to a procedure that updates the player's custom experience system. I disconnected that for now to try to get the actual GUI to show.
https://mcreator.net/comment/295853#comment-295853
what if you just do open gui and nothing else in that procedure? and can you show the keybind element?
If you're wondering, on the procedure for showing the GUI. I ran it all on the server side, as that's what someone suggested I try, to debug this. It stopped the crashing, but still won't show the GUI.
try this,
Here's the keybind for it. I know it shouldn't be on release for hiding. For testing, I just hold the key down. I've also tried removing the hide GUI procedure to see if that was causing issues. I'll go test the show procedure with just the show GUI block (Note that the release trigger is set to a different procedure; I haven't got around to changing the name yet, but it's not calling the open GUI procedure :D):
Just tried what you suggested, crashed my game when the key was pressed.
oh so keybinds can only trigger when in-game, so not in guis. That's probably why you don't see the gui. The key is instantly being released. Or at least I'm pretty sure that's how keybinds work
if you are just going to be showing stats and stuff you should use an overlay instead
For now, it's showing stats. Later tho, I plan on it being a "level up" screen, allowing players to level up other stats with buttons and such. Tried removing the release procedure. Didn't change anything.
the title says forge, are you on forge 1.20.1?
this works for me
Yeah, I'm on Forge. I prefer Forge over Fabric. I'm using the forge build plugin, if that affects anything
Maybe it does. I'm using Neoforge, which is forge for versions 1.20.1+
Can you try doing the setup I just sent. Like make a new keybind a new procedure for it and a new gui?