Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void renderPFLines(EntityLiving entityliving, double d, double d1, double d2,
- float f, float f1) {
- if (renderLine) {
- entityliving.ignoreFrustumCheck = true;
- } else {
- entityliving.ignoreFrustumCheck = false;
- }
- if (renderLine && entityliving instanceof EntityTropicraftPlayerProxy) {
- EntityTropicraftPlayerProxy koa = ((EntityTropicraftPlayerProxy)entityliving);
- if (koa.pathToEntity != null && koa.pathToEntity.points != null) {
- if (koa.pathToEntity.points.length > 1) {
- int ii = koa.pathToEntity.pathIndex - 1;
- if (ii < 0) ii = 0;
- for (int i = ii; i < koa.pathToEntity.points.length-1; i++) {
- PathPointEx ppx = koa.pathToEntity.points[i];
- PathPointEx ppx2 = koa.pathToEntity.points[i+1];
- if(ppx == null || ppx2 == null)
- return;
- if (renderLine) {
- entityliving.ignoreFrustumCheck = true;
- renderLine(ppx, ppx2, d, d1, d2, f, f1);
- } else {
- entityliving.ignoreFrustumCheck = false;
- }
- }
- }
- }
- }
- }
- public static void renderLine(PathPointEx ppx, PathPointEx ppx2, double d, double d1, double d2, float f, float f1) {
- 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 = ppx.xCoord + 0.5;//(entitypirate.prevPosX + (entitypirate.posX - entitypirate.prevPosX) * f1) - d6 * 0.35D - d4 * 0.85D;
- double pirateY = ppx.yCoord + 0.5;//(entitypirate.prevPosY + (entitypirate.posY - entitypirate.prevPosY) * f1) +yoffset;
- double pirateZ = ppx.zCoord + 0.5;//((entitypirate.prevPosZ + (entitypirate.posZ - entitypirate.prevPosZ) * f1) - d4 * 0.35D) + d6 * 0.85D;
- double entX = ppx2.xCoord + 0.5;//(entity.boundingBox.minX + (entity.boundingBox.maxX - entity.boundingBox.minX) / 2D);
- double entY = ppx2.yCoord + 0.5;//(entity.boundingBox.minY + (entity.boundingBox.maxY - entity.boundingBox.minY) / 2D);
- double entZ = ppx2.zCoord + 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 /*GL_TEXTURE_2D*/);
- GL11.glDisable(2896 /*GL_LIGHTING*/);
- 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 /*GL_LIGHTING*/);
- GL11.glEnable(3553 /*GL_TEXTURE_2D*/);
- }
Advertisement
Add Comment
Please, Sign In to add comment