    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005
    006    @SideOnly(Side.CLIENT)
    007    public abstract class TileEntitySpecialRenderer
    008    {
    009        /**
    010         * The TileEntityRenderer instance associated with this TileEntitySpecialRenderer
    011         */
    012        protected TileEntityRenderer tileEntityRenderer;
    013
    014        public abstract void renderTileEntityAt(TileEntity var1, double var2, double var4, double var6, float var8);
    015
    016        /**
    017         * Binds a texture to the renderEngine given a filename from the JAR.
    018         */
    019        protected void bindTextureByName(String par1Str)
    020        {
    021            RenderEngine var2 = this.tileEntityRenderer.renderEngine;
    022
    023            if (var2 != null)
    024            {
    025                var2.bindTexture(var2.getTexture(par1Str));
    026            }
    027        }
    028
    029        protected void func_82392_a(String par1Str, String par2Str)
    030        {
    031            RenderEngine var3 = this.tileEntityRenderer.renderEngine;
    032
    033            if (var3 != null)
    034            {
    035                var3.bindTexture(var3.getTextureForDownloadableImage(par1Str, par2Str));
    036            }
    037        }
    038
    039        /**
    040         * Associate a TileEntityRenderer with this TileEntitySpecialRenderer
    041         */
    042        public void setTileEntityRenderer(TileEntityRenderer par1TileEntityRenderer)
    043        {
    044            this.tileEntityRenderer = par1TileEntityRenderer;
    045        }
    046
    047        /**
    048         * Called when the ingame world being rendered changes (e.g. on world -> nether travel) due to using one renderer
    049         * per tile entity type, rather than instance
    050         */
    051        public void onWorldChange(World par1World) {}
    052
    053        public FontRenderer getFontRenderer()
    054        {
    055            return this.tileEntityRenderer.getFontRenderer();
    056        }
    057    }