Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
- // Jad home page: http://www.kpdus.com/jad.html
- // Decompiler options: packimports(3) braces deadcode
- import org.lwjgl.opengl.GL11;
- public class RenderTank extends Render
- {
- public RenderTank()
- {
- shadowSize = 2F;
- modelTank = new ModelTank();
- modelTank.tank = tankentity;
- tankID = tankentity.entityId;
- }
- public void func_157_a(EntityTank entitytank, double d, double d1, double d2,
- float f, float f1)
- {
- GL11.glPushMatrix();
- System.out.println(Integer.toString(entitytank.entityId));
- if(entitytank.riddenByEntity != null)
- {
- double d11 = entitytank.getSpeed();
- for(int i = 5; i < 11; i++)
- {
- modelTank.sideModels[i].rotateAngleZ -= d11*Math.PI;
- }
- }else
- {
- for(int i = 5; i < 11; i++)
- {
- modelTank.sideModels[i].rotateAngleZ = 0F;
- }
- }
- /*double d3 = entitytank.lastTickPosX + (entitytank.posX - entitytank.lastTickPosX) * (double)f1;
- double d4 = entitytank.lastTickPosY + (entitytank.posY - entitytank.lastTickPosY) * (double)f1;
- double d5 = entitytank.lastTickPosZ + (entitytank.posZ - entitytank.lastTickPosZ) * (double)f1;
- double d6 = 0.30000001192092896D;
- Vec3D vec3d = entitytank.func_514_g(d3, d4, d5);
- float f2 = entitytank.prevRotationPitch + (entitytank.rotationPitch - entitytank.prevRotationPitch) * f1;
- if(vec3d != null)
- {
- Vec3D vec3d1 = entitytank.func_515_a(d3, d4, d5, d6);
- Vec3D vec3d2 = entitytank.func_515_a(d3, d4, d5, -d6);
- if(vec3d1 == null)
- {
- vec3d1 = vec3d;
- }
- if(vec3d2 == null)
- {
- vec3d2 = vec3d;
- }
- d += vec3d.xCoord - d3;
- d1 += (vec3d1.yCoord + vec3d2.yCoord) / 2D - d4;
- d2 += vec3d.zCoord - d5;
- Vec3D vec3d3 = vec3d2.addVector(-vec3d1.xCoord, -vec3d1.yCoord, -vec3d1.zCoord);
- if(vec3d3.lengthVector() != 0.0D)
- {
- vec3d3 = vec3d3.normalize();
- f = (float)((Math.atan2(vec3d3.zCoord, vec3d3.xCoord) * 180D) / 3.1415926535897931D);
- f2 = (float)(Math.atan(vec3d3.yCoord) * 73D);
- }
- }*/
- GL11.glTranslatef((float)d, (float)d1, (float)d2);
- GL11.glRotatef(180F - f, 0.0F, 1.0F, 0.0F);
- //GL11.glRotatef(-f2, 0.0F, 0.0F, 1.0F);
- float f2 = (float)entitytank.tankTimeSinceHit - f1;
- float f3 = (float)entitytank.tankCurrentDamage - f1;
- if(f3 < 0.0F)
- {
- f3 = 0.0F;
- }
- if(f2 > 0.0F)
- {
- GL11.glRotatef(((MathHelper.sin(f2) * f2 * f3) / 10F) * (float)entitytank.tankRockDirection, 1.0F, 0.0F, 0.0F);
- }
- //modelTank.tank = entitytank;
- loadTexture("/terrain.png");
- float f4 = 0.75F;
- GL11.glScalef(f4, f4, f4);
- GL11.glScalef(1.0F / f4, 1.0F / f4, 1.0F / f4);
- loadTexture("/item/tanktexture.png");
- GL11.glScalef(-1F, -1F, 1.0F);
- modelTank.render(0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
- GL11.glPopMatrix();
- }
- public void doRender(Entity entity, double d, double d1, double d2,
- float f, float f1)
- {
- func_157_a((EntityTank)entity, d, d1, d2, f, f1);
- }
- public int tankID;
- public EntityTank tankentity;
- protected ModelTank modelTank;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement