Jump to content

[1.11.2] RenderManager#renderEntityStatic shades rest of screen instead of Entity


Recommended Posts

Posted

I'm trying to render a static entity on the screen when the player is in first person.

The RenderManager#renderEntityStatic method that I'm using seems to apply some sort of lighting to the model, but it actually applies it to the rest of

screen, but not to the model. Some images will help:

 

Note how it colores the hotbar and text darker (and the rest of the screen)

2017-08-16_12_00_59.thumb.png.344f1bd3a20365e614960885ce96e630.png

 

At day (with light)

2017-08-16_12_01_21.thumb.png.3e7af4f397299d3480f79d087d76c6e8.png

 

As you can see, it doesn't seem to change the brightness of the chicken at all in both pictures.

 

I'm using this code during RenderHandEvent:

				GlStateManager.pushMatrix();
				GlStateManager.scale(1, 1, 1);
				GlStateManager.rotate(180, 0, 1, 0);
				GlStateManager.translate(0.0, -height, width + 0.1);
				GlStateManager.enableAlpha();

				if (perspective == 0)
				{
					Minecraft.getMinecraft().getRenderManager().setRenderShadow(false);
					Minecraft.getMinecraft().getRenderManager().renderEntityStatic(entity, 0.0f, false);
					Minecraft.getMinecraft().getRenderManager().setRenderShadow(true);
				}

				GlStateManager.disableAlpha();
				GlStateManager.scale(1, 1, 1);
				GlStateManager.popMatrix();

 

 

 

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.