Posted March 6, 20187 yr Hello. I'm sorta new to Minecraft modding, but I'm experiencing a very annoying bug which I cannot seem to resolve. I have a GUI screen, and every time I try to open it, it doesn't open. This is killing me. I've made a GUI with 1.11 and higher and it worked completely fine, but with 1.8.9, it's not working at all. Here's my GUI class: https://www.hastebin.com/iziwiyorob.java I have a command class, and everytime I try to open the GUI it doesn't open. if (args.length == 1) { if (args[0].equalsIgnoreCase("gui")) { Minecraft.getMinecraft().displayGuiScreen(new MainGUI()); } } This simply doesn't open. I did some debugging to see if it's fired and it is. It just doesn't open. I tried loads of things to make it open, like sending a message then listening for ClientChatReceivedEvent, and also created a custom event and fired it when this argument is entered but still doesn't open, but it just doesn't. Any help will be much appreciated. Thanks Edited March 6, 20187 yr by Reflxction
March 6, 20187 yr Author 5 hours ago, diesieben07 said: First, is this a client command? Registered with ClientCommandHandler? If not, you need to fix that first. You cannot open GUIs from the server. You cannot open a GUI from a client-side command immediately, since the chat GUI will close after submitting the command, closing any GUI that is currently open. You must delay the opening by one tick. Oh thanks mate, I really didn't think of it like this. I've delayed it by 1 tick and now it works perfectly, thanks man I'm new to this forums thingy, how do I mark the thread as solved? Edited March 6, 20187 yr by Reflxction
March 6, 20187 yr 8 minutes ago, Reflxction said: I'm new to this forums thingy, how do I mark the thread as solved? You have to manually rename the title to [SOLVED] or something of that nature.
March 6, 20187 yr Author 9 minutes ago, That_Martin_Guy said: You have to manually rename the title to [SOLVED] or something of that nature. Ah thanks, I'm used to Bukkit forums, which has something like a thread label, but all good now thanks
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.