Fixed the Manaseer Monocle's range viewing functionality rendering as a gray square when used alongside other mods that use GL_LIGHTING, like Neat.

This commit is contained in:
Vasco Lavos committed 2015-12-05 18:18:54 +00:00
1 parent b4fe47928c
commit 1b25357616
1 file changed
+5 -1
@@ -66,17 +66,21 @@ public final class SubTileRadiusRenderHandler {
if(descriptor == null)
return;
boolean light = GL11.glGetBoolean(GL11.GL_LIGHTING);
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
Tessellator.renderingWorldRenderer = false;
if(descriptor.isCircle())
renderCircle(descriptor.getSubtileCoords(), descriptor.getCircleRadius());
else renderRectangle(descriptor.getAABB());
if(light)
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();