Jump to content

Recommended Posts

Posted

I am having a bit of trouble with a custom renderer and i am hoping someone can tell me what i am doing wrong because i have been messing with it for ages and just cant get it to work properly.

 

I am trying to use the renderer for a mob and use it for an item and it is working perfectly except for one thing... Lighting. As an item entity in the world or equipped third person it works fine but in inventory it messes with the games lighting. Specifically it makes everything darker and if you go into light level 0 almost everything is just black even things like the f3 text is to dark to read.

 

This is the item renderer class.

https://github.com/brandon3055/Draconic-Evolution/blob/master/src/main/java/com/brandon3055/draconicevolution/client/render/SoulItemRenderer.java

You can also find the rest of the mod in that repo if there is anything else you need to see.

 

I would really appreciate any help anyone can give me because i have been messing with this for a while but i just dont know enough about rendering.

I am the author of Draconic Evolution

Posted

Hi

 

Try wrapping your rendering code in this

 

      GL11.glPushAttrib(GL11.GL_ENABLE_BIT);

// render here

GL11.glPopAttrib();

 

This will save & restore the state of most of the lighting settings.

 

If that doesn't work, you could try putting

RenderHelper.enableStandardItemLighting();

after your render (not before)

 

-TGG

 

Posted

Hi

 

Try wrapping your rendering code in this

 

      GL11.glPushAttrib(GL11.GL_ENABLE_BIT);

// render here

GL11.glPopAttrib();

 

This will save & restore the state of most of the lighting settings.

 

If that doesn't work, you could try putting

RenderHelper.enableStandardItemLighting();

after your render (not before)

 

-TGG

 

 

THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I am the author of Draconic Evolution

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.