    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        /**
    011         * Associate a TileEntityRenderer with this TileEntitySpecialRenderer
    012         */
    013        public void setTileEntityRenderer(TileEntityRenderer par1TileEntityRenderer)
    014        {
    015            super.setTileEntityRenderer(par1TileEntityRenderer);
    016        }
    017
    018        public void renderTileEntityMobSpawner(TileEntityMobSpawner par1TileEntityMobSpawner, double par2, double par4, double par6, float par8)
    019        {
    020            GL11.glPushMatrix();
    021            GL11.glTranslatef((float)par2 + 0.5F, (float)par4, (float)par6 + 0.5F);
    022            Entity var9 = par1TileEntityMobSpawner.getMobEntity();
    023
    024            if (var9 != null)
    025            {
    026                var9.setWorld(par1TileEntityMobSpawner.getWorldObj());
    027                float var10 = 0.4375F;
    028                GL11.glTranslatef(0.0F, 0.4F, 0.0F);
    029                GL11.glRotatef((float)(par1TileEntityMobSpawner.yaw2 + (par1TileEntityMobSpawner.yaw - par1TileEntityMobSpawner.yaw2) * (double)par8) * 10.0F, 0.0F, 1.0F, 0.0F);
    030                GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
    031                GL11.glTranslatef(0.0F, -0.4F, 0.0F);
    032                GL11.glScalef(var10, var10, var10);
    033                var9.setLocationAndAngles(par2, par4, par6, 0.0F, 0.0F);
    034                RenderManager.instance.renderEntityWithPosYaw(var9, 0.0D, 0.0D, 0.0D, 0.0F, par8);
    035            }
    036
    037            GL11.glPopMatrix();
    038        }
    039
    040        public void renderTileEntityAt(TileEntity par1TileEntity, double par2, double par4, double par6, float par8)
    041        {
    042            this.renderTileEntityMobSpawner((TileEntityMobSpawner)par1TileEntity, par2, par4, par6, par8);
    043        }
    044    }