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

First off - Thank you to whoever decided to take pity on me and open this thread.

 

Secondly - I am brand new to modding and I'm just trying to figure out how to do Gui's, and how to open it via item.

I've created the item class, resource location class, the base mod class, the client and common proxies, all that good stuff. I have my item registered and it shows up properly in the game, so as for adding the item - I'm good to go.

What i can't for the life of me figure out, or find ANYWHERE on the internet, is how to set up,register/apply,and use a custom GUI. Would some one please help me. I will post any code requested to see, i just don't know what i should show so i will do it as we go.

 

I am using Forge 9.10 for Minecraft 1.6.2

 

and again, thank you very much

To make the introduction easier for you I would suggest you try first at adding any kind of block with a custom GUI. There should be loads of tutorials for that out there ^^

 

That should teach you about GUI handlers and GUI's.

 

GUI handlers handle simply which container and which GUI to use and display when a player opens a GUI from your mod :)

 

For an item to open a GUI you make use of the onItemUse or itemRightClick methods (Names may be slightly off, they are from memory).

Inside that method you call upon the players openGUI method and pass inn the MainModClass.instance along with the GUI ID you assigned this GUI inside your GUI handler.

 

If you guys dont get it.. then well ya.. try harder...

  • Author

ok, that makes sense. Could you by any chance direct me to a good tutorial on how to do so. the GUI/container tutorial on the Forge forums is out-dated. thanks for the help

  • Author

alright. ill take a look around. Let you guys know how trying work out. thanks a bunch for helping out

  • Author

I tried to follow the container and GUI tutorial but i simply couldn't understand most of it. The tutorial is useless for someone who is trying to understand how to do things. All the tutorial does is show you the code of the different files it uses. It doesn't even explain where some bits of code are suppose to go. I am essentially back to ground 0 =(

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.