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

Your assets folder should be in resources, not in java. Also it appears that your texture is called "photo.png", but you are looking for "hackerNotify.png".

 

Asset path names should also be entirely lowercase.

wr.pos(0, 0, 0).tex(90, 90).endVertex();
wr.pos(0, 256, 0).tex(90, 90).endVertex();
wr.pos(256, 0, 0).tex(90, 90).endVertex();
wr.pos(256, 256, 0).tex(90, 90).endVertex();

Vertices must be specified either CW or CCW, not in a "flipped N" order as you currently are doing(that's why your texture looks like a triangle).

UVs range from 0 to 1, and different vertices should have different UVs

 

ResourceLocation textureLocation = new ResourceLocation("hackerdt", "assets/hackernotify.png");

assets/ gets resolved automatically, you do not need to specify it in your path.

 

You must have your resources(textures/sounds/jsons/etc) in assets/modid/ folder.

 

GlStateManager.pushMatrix(); 
GlStateManager.popMatrix();

?

 

RenderGameOverlayEvent has different ElementTypes you need to check, otherwise you will be drawing your image multiple times a frame for each thing the event fires for.

 

A priority of an event is NORMAL by default, you do not need to explicitly specify it.

  • Author
23 minutes ago, V0idWa1k3r said:

wr.pos(0, 0, 0).tex(90, 90).endVertex();
wr.pos(0, 256, 0).tex(90, 90).endVertex();
wr.pos(256, 0, 0).tex(90, 90).endVertex();
wr.pos(256, 256, 0).tex(90, 90).endVertex();

Vertices must be specified either CW or CCW, not in a "flipped N" order as you currently are doing(that's why your texture looks like a triangle).

UVs range from 0 to 1, and different vertices should have different UVs

 


ResourceLocation textureLocation = new ResourceLocation("hackerdt", "assets/hackernotify.png");

assets/ gets resolved automatically, you do not need to specify it in your path.

 

You must have your resources(textures/sounds/jsons/etc) in assets/modid/ folder.

 


GlStateManager.pushMatrix(); 
GlStateManager.popMatrix();

?

 

RenderGameOverlayEvent has different ElementTypes you need to check, otherwise you will be drawing your image multiple times a frame for each thing the event fires for.

 

A priority of an event is NORMAL by default, you do not need to explicitly specify it.

Can I have some example code for a 256 x 256 square? I find it easier to learn by looking at code and then going through it and understanding it, plus it gives me something I can reference in the future

2 minutes ago, BillehBawb said:

Can I have some example code for a 256 x 256 square?

Look at the methods in the class you are extending - Gui. The image dimenions are irrelevant as you specify everything yourself.

Edited by V0idWa1k3r

  • Author
1 hour ago, Kokkie said:

Try using Gui.drawTexturedModalRect(...).

 

1 hour ago, V0idWa1k3r said:

Look at the methods in the class you are extending - Gui. The image dimenions are irrelevant as you specify everything yourself.

Thanks both of you, after some experimenting I got it to show up. I just have a few more small questions... first off, is there a simple way to just display text? I want to display text over my image and it changed depending on arguments and the situation.

40 minutes ago, Kokkie said:

That's because it isn't static, try Minecraft.getMinecraft().ingameGUI.

Ooorr... just use this.drawString, since you have access to it because you extend the Gui class.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

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.