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