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've been trying to render a translucent texture in for my item, but no matter how I color it, or what setting I try to use, it always renders solid black instead of tinted like it should be. Anyone have an idea for a fix?

 

Code: http://pastebin.com/UVp9xvaV

 

Here's an image of the item as it renders now (the black shape should be a tinted eye): http://imgur.com/zqOyNFT

 

Thanks in advance :D

if the problem is the item in slot 1

then take a good look at it

it is rendering transparencies (look at to outside shape)

check your transparency on the inside bit, 

if it has a slight opacity it will render as fully opaque

 

the only items i have ever seen in the game with opacity are all blocks

and they use

    @SideOnly(Side.CLIENT)
    public int getRenderBlockPass()
    {
        return 1;
    }

to do that, but i dont know how you would for an item,  that is if it is possible

 

 

Hi

 

Try adding

    GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

just after your GL11.glEnable(GL11.GL_BLEND);

 

-TGG

  • Author

Nope, that didn't work. The item still renders black, as in the picture D: Could it be the image itself?

Hi

 

After looking more closely at your code I think the problem is probably here

 

            GL11.glColor3f(c.getRed() / 255, c.getGreen() / 255, c.getBlue() / 255);

 

This uses integer division so it becomes GL11.glColor3f(0, 0, 0);

 

Try

/ 255.0F

instead of

/ 255

 

-TGG

 

  • Author

That fixed it :D Wow, I can't believe it was that simple of a mistake... I need to go through my specifics more. Thanks Grey Ghost! :3

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.