content: package net.minecraft.client.renderer;
  
  import net.minecraft.util.Vec3;
  import org.lwjgl.opengl.GL11;
  
  import java.nio.FloatBuffer;
  
  public class RenderHelper {
      private static final FloatBuffer colorBuffer = GLAllocation.createDirectFloatBuffer(16);
      private static final Vec3 LIGHT0_POS = (new Vec3(0.20000000298023224D, 1.0D, -0.699999988079071D)).normalize();
      private static final Vec3 LIGHT1_POS = (new Vec3(-0.20000000298023224D, 1.0D, 0.699999988079071D)).normalize();
  
      public static void disableStandardItemLighting() {
          GlStateManager.disableLighting();
          GlStateManager.disableLight(0);
          GlStateManager.disableLight(1);
          GlStateManager.disableColorMaterial();
      }
  
      public static void enableStandardItemLighting() {
          GlStateManager.enableLighting();
          GlStateManager.enableLight(0);
          GlStateManager.enableLight(1);
          GlStateManager.enableColorMaterial();
          GlStateManager.colorMaterial(1032, 5634);
          float f = 0.4F;
          float f1 = 0.6F;
          float f2 = 0.0F;
          GL11.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, setColorBuffer(LIGHT0_POS.xCoord, LIGHT0_POS.yCoord, LIGHT0_POS.zCoord, 0.0D));
          GL11.glLight(GL11.GL_LIGHT0, GL11.GL_DIFFUSE, setColorBuffer(f1, f1, f1, 1.0F));
          GL11.glLight(GL11.GL_LIGHT0, GL11.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
          GL11.glLight(GL11.GL_LIGHT0, GL11.GL_SPECULAR, setColorBuffer(f2, f2, f2, 1.0F));
          GL11.glLight(GL11.GL_LIGHT1, GL11.GL_POSITION, setColorBuffer(LIGHT1_POS.xCoord, LIGHT1_POS.yCoord, LIGHT1_POS.zCoord, 0.0D));
          GL11.glLight(GL11.GL_LIGHT1, GL11.GL_DIFFUSE, setColorBuffer(f1, f1, f1, 1.0F));
          GL11.glLight(GL11.GL_LIGHT1, GL11.GL_AMBIENT, setColorBuffer(0.0F, 0.0F, 0.0F, 1.0F));
          GL11.glLight(GL11.GL_LIGHT1, GL11.GL_SPECULAR, setColorBuffer(f2, f2, f2, 1.0F));
          GlStateManager.shadeModel(7424);
          GL11.glLightModel(GL11.GL_LIGHT_MODEL_AMBIENT, setColorBuffer(f, f, f, 1.0F));
      }
  
      private static FloatBuffer setColorBuffer(double p_74517_0_, double p_74517_2_, double p_74517_4_, double p_74517_6_) {
          return setColorBuffer((float) p_74517_0_, (float) p_74517_2_, (float) p_74517_4_, (float) p_74517_6_);
      }
  
      private static FloatBuffer setColorBuffer(float p_74521_0_, float p_74521_1_, float p_74521_2_, float p_74521_3_) {
          colorBuffer.clear();
          colorBuffer.put(p_74521_0_).put(p_74521_1_).put(p_74521_2_).put(p_74521_3_);
          colorBuffer.flip();
          return colorBuffer;
      }
  
      public static void enableGUIStandardItemLighting() {
          GlStateManager.pushMatrix();
          GlStateManager.rotate(-30.0F, 0.0F, 1.0F, 0.0F);
          GlStateManager.rotate(165.0F, 1.0F, 0.0F, 0.0F);
          enableStandardItemLighting();
          GlStateManager.popMatrix();
      }
  }
  