Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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) {
- Tessellator tessellator = Tessellator.instance;
- RenderManager rm = RenderManager.instance;
- float castProgress = 1.0F;
- float f10 = 0F;//((entitypirate.prevRenderYawOffset + (entitypirate.renderYawOffset - entitypirate.prevRenderYawOffset) * f1) * 3.141593F) / 180F;
- double d4 = MathHelper.sin(f10);
- double d6 = MathHelper.cos(f10);
- double pirateX = x1;// + 0.5;//(entitypirate.prevPosX + (entitypirate.posX - entitypirate.prevPosX) * f1) - d6 * 0.35D - d4 * 0.85D;
- double pirateY = y1;// + 0.5;//(entitypirate.prevPosY + (entitypirate.posY - entitypirate.prevPosY) * f1) +yoffset;
- double pirateZ = z1;// + 0.5;//((entitypirate.prevPosZ + (entitypirate.posZ - entitypirate.prevPosZ) * f1) - d4 * 0.35D) + d6 * 0.85D;
- double entX = x2;// + 0.5;//(entity.boundingBox.minX + (entity.boundingBox.maxX - entity.boundingBox.minX) / 2D);
- double entY = y2;// + 0.5;//(entity.boundingBox.minY + (entity.boundingBox.maxY - entity.boundingBox.minY) / 2D);
- double entZ = z2;// + 0.5;//(entity.boundingBox.minZ + (entity.boundingBox.maxZ - entity.boundingBox.minZ) / 2D);
- double fishX = castProgress*(entX - pirateX);
- double fishY = castProgress*(entY - pirateY);
- double fishZ = castProgress*(entZ - pirateZ);
- GL11.glDisable(3553);
- GL11.glDisable(2896);
- tessellator.startDrawing(3);
- //int stringColor = 0x888888;
- //if (((EntityNode)entitypirate).render) {
- //stringColor = 0x880000;
- //} else {
- //stringColor = 0xEF4034;
- //}
- tessellator.setColorOpaque_I(stringColor);
- int steps = 16;
- for (int i = 0; i <= steps; ++i) {
- float f4 = i/(float)steps;
- tessellator.addVertex(
- pirateX - rm.renderPosX + fishX * f4,//(f4 * f4 + f4) * 0.5D + 0.25D,
- pirateY - rm.renderPosY + fishY * f4,//(f4 * f4 + f4) * 0.5D + 0.25D,
- pirateZ - rm.renderPosZ + fishZ * f4);
- }
- tessellator.draw();
- GL11.glEnable(2896);
- GL11.glEnable(3553);
- }
Advertisement
Add Comment
Please, Sign In to add comment