    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import org.lwjgl.opengl.GL11;
    006
    007    @SideOnly(Side.CLIENT)
    008    public class TileEntityMobSpawnerRenderer extends TileEntitySpecialRenderer
    009    {
    010        public void renderTileEntityMobSpawner(TileEntityMobSpawner par1TileEntityMobSpawner, double par2, double par4, double par6, float par8)
    011        {
    012            GL11.glPushMatrix();
    013            GL11.glTranslatef((float)par2 + 0.5F, (float)par4, (float)par6 + 0.5F);
    014            Entity var9 = par1TileEntityMobSpawner.getMobEntity();
    015
    016            if (var9 != null)
    017            {
    018                var9.setWorld(par1TileEntityMobSpawner.getWorldObj());
    019                float var10 = 0.4375F;
    020                GL11.glTranslatef(0.0F, 0.4F, 0.0F);
    021                GL11.glRotatef((float)(par1TileEntityMobSpawner.yaw2 + (par1TileEntityMobSpawner.yaw - par1TileEntityMobSpawner.yaw2) * (double)par8) * 10.0F, 0.0F, 1.0F, 0.0F);
    022                GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
    023                GL11.glTranslatef(0.0F, -0.4F, 0.0F);
    024                GL11.glScalef(var10, var10, var10);
    025                var9.setLocationAndAngles(par2, par4, par6, 0.0F, 0.0F);
    026                RenderManager.instance.renderEntityWithPosYaw(var9, 0.0D, 0.0D, 0.0D, 0.0F, par8);
    027            }
    028
    029            GL11.glPopMatrix();
    030        }
    031
    032        public void renderTileEntityAt(TileEntity par1TileEntity, double par2, double par4, double par6, float par8)
    033        {
    034            this.renderTileEntityMobSpawner((TileEntityMobSpawner)par1TileEntity, par2, par4, par6, par8);
    035        }
    036    }