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

Hi!

I wanna make a Gui next to the inventory, but i cant find the event for it.

Do you know what/where is this Event/boolean?

(I think this is an event or boolean)

I need a line like that:

if( -|INVENTORY OPENED|- );

{

    tam-tararam-ta-tam-ta-tam

}

;D ;D ;D

Nevermind, please help me if you can!

You may use RenderGameOverlayEvent or a TickHandler.

Then check if world is loaded, player exists, and has open the inventory you want to build a Gui against.

@GotoLink, i was using tickhandler to draw stuff before the RenderGameOverlayEvent was made. (jeez that sounds hipster)

and afaik you cant interract with it. so i think its worth to note that you will only be able to look at this GUI and not interract with it

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

do you need to interract with it ? like click on buttons and stuff, cuz it wont work if you need to

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

I think opening another gui (with buttons and even slots) is feasible, though you can't rely on player.opengui(...) to do that, because Minecraft would allow only one to be open at a time. You'll have to catch mouse event on your own, i suppose.

Another solution would be to make an "extending Gui", a gui that look like the one you replace, with more buttons and stuff.

You'll have to pass the vanilla gui content into your own then.

I remember mods that probably did this in 1.4.7.

@GotoLink, probably with a coremod :\

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

  • Author

I think opening another gui (with buttons and even slots) is feasible, though you can't rely on player.opengui(...) to do that, because Minecraft would allow only one to be open at a time. You'll have to catch mouse event on your own, i suppose.

Another solution would be to make an "extending Gui", a gui that look like the one you replace, with more buttons and stuff.

You'll have to pass the vanilla gui content into your own then.

I remember mods that probably did this in 1.4.7.

 

You think it is possible? How hard do you think?

As for the first idea (opening a GUI while another GUI is still open) this is probably making-your-own-gui-system-from-start-to-finish (like a game within a game) kinda hard. Intensive use of a tickhandler, making your own mouse listener, catching packets if you want to pass items between the two GUIs, then saving data somehow when your own GUI closes...

The second idea would require keeping a copy of the original GUI, closing it, opening a combined GUI with the copy as an argument, so it can build it again and add more. Making this copy (the only hard step, as everything else can be handled by vanilla Minecraft) may require reflection, bytecode manipulation...this is on advanced-object-handling level, i think.

  • Author

I have got a new idea about it! It will be sooo better!

I will made a gui, like It will be GuiInGame, i will made pressable pictures to the right bottom corner. If i press, the Gui is appear. Like World of Warcraft xD and a binded button to Show/Hide the mouse. I think its a really good idea.  ;D ;D ;D

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.