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 everyone,

 

I am trying to make a GuiScreen as a guide for my mod, and it have pictures in it. And in Eclipse it works well, every picture is shown, but when i export the mod, the bookbackground is shown, every text shows up, but the images i put in are only shown as error image(these purple/black image). Where is my mistake when it is right in Eclipse but not in the exported mod?

 

Thanks for answers,

 

Kaneka

Code?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

Hope this is enought:

 

public class GuiGuidebook extends GuiScreen {
public static final ResourceLocation BACKGROUND = new ResourceLocation("planttech:textures/gui/bookt.png");
private static ResourceLocation[] picture = new ResourceLocation[bookTotalPages];

...

public GuiGuidebook()
{
    stringHeaderText[0] = "Compost Bin";
    stringPageText[0] = "Takes apples, potatoes, leaves or equal and a bit of time to transform them to biomass. \n\nThe basic of every good planttechian!";
    picture[0] = new ResourceLocation("planttech:textures/gui/recipes/compostbin.png");

...

public void drawScreen(int parWidth, int parHeight, float p_73863_3_)
{
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    
    mc.getTextureManager().bindTexture(BACKGROUND);
    int offsetFromScreenLeft = (width - bookImageWidth ) / 2;
    drawModalRectWithCustomSizedTexture(offsetFromScreenLeft, 2, 0, 0, 400, 250, 400, 300);
    mc.getTextureManager().bindTexture(picture[currPage]);
    drawModalRectWithCustomSizedTexture(280, 80, 0, 0, 100, 100, 100, 100);
...

 

If more is needet, tell me to post more

Also do this for me:

 

Capture.png

 

(This is my own resources, I'm interested in seeing yours, open up just enough to show me the compostbin.png)

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

That was the perfect clue... find my mistake, i don't know why, but all the pictures was saved as .PNG, not as .png... that was the mistake...

 

Thanks for your help :)

Yup, case matters when compiled. Windows doesn't give a shit.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.