/* * Decompiled with CFR 0.152. * * Could not load the following classes: * cpw.mods.fml.relauncher.Side * cpw.mods.fml.relauncher.SideOnly * net.minecraft.client.renderer.Tessellator * net.minecraft.client.renderer.entity.Render * net.minecraft.entity.Entity * net.minecraft.util.ResourceLocation * org.lwjgl.opengl.GL11 */ package com.tanzanite.SA.render; import com.tanzanite.SA.entities.EntityDriveCure; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; @SideOnly(value=Side.CLIENT) public class RenderDriveCure extends Render { private static double[][] dVec = new double[][]{{0.0, 1.0, -0.5}, {0.0, 0.75, 0.0}, {0.1, 0.6, -0.15}, {0.0, 0.5, -0.25}, {-0.1, 0.6, -0.15}, {0.0, 0.0, 0.25}, {0.25, 0.0, 0.0}, {0.0, 0.0, -0.25}, {-0.25, 0.0, 0.0}, {0.0, -0.75, 0.0}, {0.1, -0.6, -0.15}, {0.0, -0.5, -0.25}, {-0.1, -0.6, -0.15}, {0.0, -1.0, -0.5}}; private static int[][] nVecPos = new int[][]{{0, 1, 2, 3}, {0, 3, 4, 1}, {1, 5, 6, 2}, {3, 2, 6, 7}, {3, 7, 8, 4}, {1, 4, 8, 5}, {6, 5, 9, 10}, {6, 10, 11, 7}, {8, 7, 11, 12}, {8, 12, 9, 5}, {10, 9, 13, 11}, {12, 11, 13, 9}}; public void func_76986_a(Entity entity, double d0, double d1, double d2, float f, float f1) { if (entity instanceof EntityDriveCure) { this.doDriveRender((EntityDriveCure)entity, d0, d1, d2, f, f1); } } protected ResourceLocation func_110775_a(Entity var1) { return null; } private void doDriveRender(EntityDriveCure entity, double dX, double dY, double dZ, float f, float f1) { Tessellator tessellator = Tessellator.field_78398_a; GL11.glDisable((int)3553); GL11.glDisable((int)2896); GL11.glEnable((int)3042); GL11.glBlendFunc((int)770, (int)1); GL11.glPushMatrix(); GL11.glTranslatef((float)((float)dX), (float)((float)dY), (float)((float)dZ)); GL11.glRotatef((float)entity.field_70177_z, (float)0.0f, (float)1.0f, (float)0.0f); GL11.glRotatef((float)(-entity.field_70125_A), (float)1.0f, (float)0.0f, (float)0.0f); GL11.glRotatef((float)entity.getRoll(), (float)0.0f, (float)0.0f, (float)1.0f); float c = entity.getc(); float k = entity.getk(); float g = entity.getg(); GL11.glScalef((float)k, (float)c, (float)g); float lifetime = entity.getLifeTime(); float ticks = entity.field_70173_aa; tessellator.func_78382_b(); tessellator.func_78384_a(entity.getColor(), (int)(255.0f * (float)Math.pow((lifetime - Math.min(lifetime, ticks)) / lifetime, 2.0))); double dScale = 1.0; for (int idx = 0; idx < nVecPos.length; ++idx) { tessellator.func_78377_a(dVec[nVecPos[idx][0]][0] * dScale, dVec[nVecPos[idx][0]][1] * dScale, dVec[nVecPos[idx][0]][2] * dScale); tessellator.func_78377_a(dVec[nVecPos[idx][1]][0] * dScale, dVec[nVecPos[idx][1]][1] * dScale, dVec[nVecPos[idx][1]][2] * dScale); tessellator.func_78377_a(dVec[nVecPos[idx][2]][0] * dScale, dVec[nVecPos[idx][2]][1] * dScale, dVec[nVecPos[idx][2]][2] * dScale); tessellator.func_78377_a(dVec[nVecPos[idx][3]][0] * dScale, dVec[nVecPos[idx][3]][1] * dScale, dVec[nVecPos[idx][3]][2] * dScale); } tessellator.func_78381_a(); GL11.glPopMatrix(); GL11.glDisable((int)3042); GL11.glEnable((int)2896); GL11.glEnable((int)3553); } }