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

To add on:

 

 

20 ticks equals a second.

(I'll let you do the math for minute and hour, because that's simple math)

24000 ticks equals a Minecraft day (which is 20 minutes IRL).

 

And so on, and so forth. Just so you know the conversions.

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information

You can always create a gui that does not require a container. You only need to return null for your server element. (Probably wrong about that, but I'm pretty sure that's okay to do).

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information

You can always create a gui that does not require a container. You only need to return null for your server element. (Probably wrong about that, but I'm pretty sure that's okay to do).

 

 

Or you could just use the RenderGameOverlay event and draw it that way if it's something he wants up always.

Or you could just use the RenderGameOverlay event and draw it that way if it's something he wants up always.

 

He wants a gui, not something rendering over in the ingame GUI. He could use that, but he wants to have a gui.

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information

Or you could just use the RenderGameOverlay event and draw it that way if it's something he wants up always.

 

He wants a gui, not something rendering over in the ingame GUI. He could use that, but he wants to have a gui.

 

Well, it sounds like that is what he wants: "how can I make a gui on the ingame screen"

If you want to make a Gui that opens with button you will need to extend GuiScreen.

 

in initGui() you will place all buttons and declare "new" objects. in draw method you can do whatever you want. Note that initGui() is called everytime you resize window. Also: a lot of fields are alredy initialized in superclass (GuiScreen) so for mc/fontRenderer use existing ones.

To draw stuff aligned you will use this.width and this.height (eg. to draw in center:  this.width/2, this.height/2)

fontRenderer is your friend for drawin strings.

Note: before you start drawing some texture you always have to bind it.

 

To open GuiScreen you can use Minecraft.getMinecraft().displayGuiScreen(new MyGuiScreen());

This can be called via button-press (using button events).

 

This should give you some start.

 

Otherwise yeah - RenderGameOverlay is your friend for drawing on ingameScreen (like health/exp bar).

1.7.10 is no longer supported by forge, you are on your own.

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.