Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 by Reflxction

  • 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 :D

 

I'm new to this forums thingy, how do I mark the thread as solved?

Edited by Reflxction

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.

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.