Advertisement
Guest User

Untitled

a guest
Jul 5th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.14 KB | None | 0 0
  1.     private void renderLightRuneFx(Vec3Int coord) {
  2.         GL11.glPushMatrix();
  3.  
  4.         EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
  5.  
  6.  
  7.         double offsetX = coord.x - (player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks) + 0.5;
  8.         double offsetY = coord.y - (player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks) + 5.5;
  9.         double offsetZ = coord.z - (player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks) + 0.5;
  10.  
  11.         GL11.glTranslated(coord.x - player.posX + 0.5, coord.y - player.posY + 5.5, coord.z - player.posZ + 0.5);
  12.         GL11.glColor3f(1f, 0, 0);
  13.         GL11.glRotatef(renderTick, 0, 1, 0);
  14.  
  15.         GL11.glEnable(GL11.GL_LIGHTING);
  16.         GL11.glLightf(GL11.GL_LIGHT0, GL11.GL_QUADRATIC_ATTENUATION, 1);
  17.         GL11.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, lightPosition);
  18.  
  19.        // System.out.println("render at " + coord);
  20.        // System.out.printf("modified: %f %f %f%n", coord.x - player.posX + 0.5, coord.y - player.posY + 0.5, coord.z - player.posZ + 0.5);
  21.         sphere.draw(2, 24, 24);
  22.  
  23.         GL11.glPopMatrix();
  24.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement