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