Jump to content

Gui screen


GodOfYeti

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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"

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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