Advertisement
Corosus

Untitled

Apr 26th, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.20 KB | None | 0 0
  1. public static void renderLineFromToBlock(double x1, double y1, double z1, double x2, double y2, double z2, double d, double d1, double d2, float f, float f1, int stringColor) {
  2.         Tessellator tessellator = Tessellator.instance;
  3.         RenderManager rm = RenderManager.instance;
  4.        
  5.         float castProgress = 1.0F;
  6.    
  7.         float f10 = 0F;//((entitypirate.prevRenderYawOffset + (entitypirate.renderYawOffset - entitypirate.prevRenderYawOffset) * f1) * 3.141593F) / 180F;
  8.         double d4 = MathHelper.sin(f10);
  9.         double d6 = MathHelper.cos(f10);
  10.    
  11.         double pirateX = x1;// + 0.5;//(entitypirate.prevPosX + (entitypirate.posX - entitypirate.prevPosX) * f1) - d6 * 0.35D - d4 * 0.85D;
  12.         double pirateY = y1;// + 0.5;//(entitypirate.prevPosY + (entitypirate.posY - entitypirate.prevPosY) * f1) +yoffset;
  13.         double pirateZ = z1;// + 0.5;//((entitypirate.prevPosZ + (entitypirate.posZ - entitypirate.prevPosZ) * f1) - d4 * 0.35D) + d6 * 0.85D;
  14.         double entX = x2;// + 0.5;//(entity.boundingBox.minX + (entity.boundingBox.maxX - entity.boundingBox.minX) / 2D);
  15.         double entY = y2;// + 0.5;//(entity.boundingBox.minY + (entity.boundingBox.maxY - entity.boundingBox.minY) / 2D);
  16.         double entZ = z2;// + 0.5;//(entity.boundingBox.minZ + (entity.boundingBox.maxZ - entity.boundingBox.minZ) / 2D);
  17.    
  18.         double fishX = castProgress*(entX - pirateX);
  19.         double fishY = castProgress*(entY - pirateY);
  20.         double fishZ = castProgress*(entZ - pirateZ);
  21.         GL11.glDisable(3553);
  22.         GL11.glDisable(2896);
  23.         tessellator.startDrawing(3);
  24.         //int stringColor = 0x888888;
  25.         //if (((EntityNode)entitypirate).render) {
  26.             //stringColor = 0x880000;
  27.         //} else {
  28.             //stringColor = 0xEF4034;
  29.         //}
  30.         tessellator.setColorOpaque_I(stringColor);
  31.         int steps = 16;
  32.    
  33.         for (int i = 0; i <= steps; ++i) {
  34.             float f4 = i/(float)steps;
  35.             tessellator.addVertex(
  36.                 pirateX - rm.renderPosX + fishX * f4,//(f4 * f4 + f4) * 0.5D + 0.25D,
  37.                 pirateY - rm.renderPosY + fishY * f4,//(f4 * f4 + f4) * 0.5D + 0.25D,
  38.                 pirateZ - rm.renderPosZ + fishZ * f4);
  39.         }
  40.        
  41.         tessellator.draw();
  42.         GL11.glEnable(2896);
  43.         GL11.glEnable(3553);
  44.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement