    001    package net.minecraft.client.renderer.entity;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import net.minecraft.client.renderer.Tessellator;
    006    import net.minecraft.entity.Entity;
    007    import net.minecraft.entity.projectile.EntityFireball;
    008    import org.lwjgl.opengl.GL11;
    009    import org.lwjgl.opengl.GL12;
    010
    011    @SideOnly(Side.CLIENT)
    012    public class RenderFireball extends Render
    013    {
    014        private float field_77002_a;
    015
    016        public RenderFireball(float par1)
    017        {
    018            this.field_77002_a = par1;
    019        }
    020
    021        public void doRenderFireball(EntityFireball par1EntityFireball, double par2, double par4, double par6, float par8, float par9)
    022        {
    023            GL11.glPushMatrix();
    024            GL11.glTranslatef((float)par2, (float)par4, (float)par6);
    025            GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    026            float var10 = this.field_77002_a;
    027            GL11.glScalef(var10 / 1.0F, var10 / 1.0F, var10 / 1.0F);
    028            byte var11 = 46;
    029            this.loadTexture("/gui/items.png");
    030            Tessellator var12 = Tessellator.instance;
    031            float var13 = (float)(var11 % 16 * 16 + 0) / 256.0F;
    032            float var14 = (float)(var11 % 16 * 16 + 16) / 256.0F;
    033            float var15 = (float)(var11 / 16 * 16 + 0) / 256.0F;
    034            float var16 = (float)(var11 / 16 * 16 + 16) / 256.0F;
    035            float var17 = 1.0F;
    036            float var18 = 0.5F;
    037            float var19 = 0.25F;
    038            GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    039            GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    040            var12.startDrawingQuads();
    041            var12.setNormal(0.0F, 1.0F, 0.0F);
    042            var12.addVertexWithUV((double)(0.0F - var18), (double)(0.0F - var19), 0.0D, (double)var13, (double)var16);
    043            var12.addVertexWithUV((double)(var17 - var18), (double)(0.0F - var19), 0.0D, (double)var14, (double)var16);
    044            var12.addVertexWithUV((double)(var17 - var18), (double)(1.0F - var19), 0.0D, (double)var14, (double)var15);
    045            var12.addVertexWithUV((double)(0.0F - var18), (double)(1.0F - var19), 0.0D, (double)var13, (double)var15);
    046            var12.draw();
    047            GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    048            GL11.glPopMatrix();
    049        }
    050
    051        /**
    052         * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
    053         * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
    054         * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
    055         * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
    056         */
    057        public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
    058        {
    059            this.doRenderFireball((EntityFireball)par1Entity, par2, par4, par6, par8, par9);
    060        }
    061    }