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

I read this topic (http://www.minecraftforge.net/forum/index.php/topic,11558.msg59576.html#msg59576) but I didn't understand very well how to do it :\

 

I.e. I have a texture named "testBack" that has a screen (transparent), and I have another texture named "theOverlay"...

 

How can I register them so I can have the screen with the texture theOverlay?

 

    @SideOnly(Side.CLIENT)

    @Override

    public void registerBlockIcons(IIconRegister reg) {

        this.side = reg.registerIcon(textureSide);

       

        /* this next line is not what I have, it's just for showing what I want +- */

        this.front = reg.registerIcon(testBack + theOverlay);

    }

 

    @SideOnly(Side.CLIENT)

    @Override

    public IIcon getIcon(int side, int metadata){

        if (side == 1) return this.side;

        else if (side == 0) return this.side;

        else if (metadata == 2 && side == 2) return this.front;

        else if (metadata == 3 && side == 5) return this.front;

        else if (metadata == 0 && side == 3) return this.front;

        else if (metadata == 1 && side == 4) return this.front;

        else return this.side;

    }

 

Thank you :)

João Fernandes

Thanks :)

João Fernandes

A texture is just that a texture.  If you want to render two at once, you need to render in multiple passes.

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

Hm, ok! So, if I understand right what you said, I need somthing like this:

 

 

public int pass;

 

public int getRenderBlockPass() {

        return this.pass;

    }

 

@Override

public boolean canRenderInPass(int pass) {

        this.pass = pass;

        return true;

    }

 

 

But how do I apply it? That's my question...

 

If I have an icon front[2], if I put in front[0] = theOverlay and in the front[1] = testBack, how do I render in multiple passes?

 

Thanks for the answer :)

João Fernandes

Thanks :)

João Fernandes

www.minecraftforge.net/wiki/Multiple_Pass_Render_Blocks

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

Thanks mate ^^ it worked pretty well!

 

 

r7SkzwX.png

 

Thanks :)

João Fernandes

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.