Permalink
Browse files

Fixed a lighting issue with plasma cannons.

  • Loading branch information...
Ri5ux committed Sep 28, 2018
1 parent 6004a03 commit 81e66e2782776fa45187430cd0f8a0b34ff8a08c
Showing with 6 additions and 5 deletions.
  1. +6 −5 src/main/java/org/avp/client/render/RenderPlayerPlasmaCannon.java
@@ -142,15 +142,16 @@ public void renderFirstPerson(Event event, float partialTicks)
OpenGL.pushMatrix();
{
int brightness = Worlds.getLightAtCoord(Game.minecraft().world, entity.getPosition());
int ltu = brightness % 65536;
int ltv = brightness / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) ltu / 1.0F, (float) ltv / 1.0F);
// int brightness = Worlds.getLightAtCoord(Game.minecraft().world, entity.getPosition());
// int ltu = brightness % 65536;
// int ltv = brightness / 65536;
// OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) ltu / 1.0F, (float) ltv / 1.0F);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
OpenGL.rotate(rotationPitch, 1.0F, 0.0F, 0.0F);
OpenGL.rotate(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * partialTicks, 0.0F, 1.0F, 0.0F);
OpenGL.enableStandardItemLighting();
OpenGL.enableLightMapping();
OpenGL.popMatrix();
EntityPlayerSP entityplayersp = (EntityPlayerSP) entity;
float armPitch = entityplayersp.prevRenderArmPitch + (entityplayersp.renderArmPitch - entityplayersp.prevRenderArmPitch) * partialTicks;
@@ -184,7 +185,7 @@ public void renderFirstPerson(Event event, float partialTicks)
// OpenGL.rotate(rotationYawHead, 0F, 1F, 0F);
// OpenGL.rotate(rotationPitch, 1F, 0F, 0F);
// OpenGL.translate(0F, 0F, -1F);
// OpenGL.enableLight();
// OpenGL.enableLight();
MODEL_FIRST_PERSON.draw();
float rotation = (entity.world.getWorldTime() + partialTicks) % 360;

0 comments on commit 81e66e2

Please sign in to comment.