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 RenderTankBullet extends Render
- {
- public RenderTankBullet()
- {
- }
- private void bulletTypeSetup(float u1, float u2, float v1, float v2, float u3, float u4, float v3, float v4, float diameter)
- {
- UVs[0] = u1 / 32F;
- UVs[1] = u2 / 32F;
- UVs[2] = v1 / 32F;
- UVs[3] = v2 / 32F;
- UVs[4] = u3 / 32F;
- UVs[5] = u4 / 32F;
- UVs[6] = v3 / 32F;
- UVs[7] = v4 / 32F;
- UVs[8] = diameter;
- }
- public void func_154_a(EntityTankBullet entitytankbullet, double d, double d1, double d2,
- float f, float f1)
- {
- if(entitytankbullet.type >=0 && entitytankbullet.type <=4)
- {
- loadTexture("/item/entityTankBullet.png");
- }
- GL11.glPushMatrix();
- GL11.glTranslatef((float)d, (float)d1, (float)d2);
- GL11.glRotatef((entitytankbullet.prevRotationYaw + (entitytankbullet.rotationYaw - entitytankbullet.prevRotationYaw) * f1) - 90F, 0.0F, 1.0F, 0.0F);
- GL11.glRotatef(entitytankbullet.prevRotationPitch + (entitytankbullet.rotationPitch - entitytankbullet.prevRotationPitch) * f1, 0.0F, 0.0F, 1.0F);
- Tessellator tessellator = Tessellator.instance;
- if(entitytankbullet.type == 0)
- {
- bulletTypeSetup(0, 16, 0, 10, 0, 10, 10, 20, 4);
- }
- if(entitytankbullet.type == 1)
- {
- bulletTypeSetup(0, 16, 20, 25, 0, 5, 25, 30, 2);
- }
- float f10 = 0.05625F;
- GL11.glEnable(32826 /*GL_RESCALE_NORMAL_EXT*/);
- float f11 = (float)entitytankbullet.TankBulletShake - f1;
- if(f11 > 0.0F)
- {
- float f12 = -MathHelper.sin(f11 * 3F) * f11;
- GL11.glRotatef(f12, 0.0F, 0.0F, 1.0F);
- }
- GL11.glRotatef(45F, 1.0F, 0.0F, 0.0F);
- GL11.glScalef(f10, f10, f10);
- GL11.glTranslatef(-4F, 0.0F, 0.0F);
- GL11.glNormal3f(f10, 0.0F, 0.0F);
- tessellator.startDrawingQuads();
- tessellator.addVertexWithUV(-8D, -UVs[8], -UVs[8], UVs[4], UVs[6]);
- tessellator.addVertexWithUV(-8D, -UVs[8], UVs[8], UVs[5], UVs[6]);
- tessellator.addVertexWithUV(-8D, UVs[8], UVs[8], UVs[5], UVs[7]);
- tessellator.addVertexWithUV(-8D, UVs[8], -UVs[8], UVs[4], UVs[7]);
- tessellator.draw();
- GL11.glNormal3f(-f10, 0.0F, 0.0F);
- tessellator.startDrawingQuads();
- tessellator.addVertexWithUV(-8D, UVs[8], -UVs[8], UVs[4], UVs[6]);
- tessellator.addVertexWithUV(-8D, UVs[8], UVs[8], UVs[5], UVs[6]);
- tessellator.addVertexWithUV(-8D, -UVs[8], UVs[8], UVs[5], UVs[7]);
- tessellator.addVertexWithUV(-8D, -UVs[8], -UVs[8], UVs[4], UVs[7]);
- tessellator.draw();
- for(int j = 0; j < 4; j++)
- {
- GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
- GL11.glNormal3f(0.0F, 0.0F, f10);
- tessellator.startDrawingQuads();
- tessellator.addVertexWithUV(-8D, -UVs[8], 0.0D, UVs[0], UVs[2]);
- tessellator.addVertexWithUV(8D, -UVs[8], 0.0D, UVs[1], UVs[2]);
- tessellator.addVertexWithUV(8D, UVs[8], 0.0D, UVs[1], UVs[3]);
- tessellator.addVertexWithUV(-8D, UVs[8], 0.0D, UVs[0], UVs[3]);
- tessellator.draw();
- }
- GL11.glDisable(32826 /*GL_RESCALE_NORMAL_EXT*/);
- GL11.glPopMatrix();
- }
- public void doRender(Entity entity, double d, double d1, double d2,
- float f, float f1)
- {
- func_154_a((EntityTankBullet)entity, d, d1, d2, f, f1);
- }
- private float UVs[] = new float[9];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement