    001    package net.minecraft.client.renderer;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import net.minecraft.block.Block;
    006    import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
    007    import net.minecraft.tileentity.TileEntityChest;
    008    import net.minecraft.tileentity.TileEntityEnderChest;
    009
    010    @SideOnly(Side.CLIENT)
    011    public class ChestItemRenderHelper
    012    {
    013        /** The static instance of ChestItemRenderHelper. */
    014        public static ChestItemRenderHelper instance = new ChestItemRenderHelper();
    015
    016        /** Instance of Chest's Tile Entity. */
    017        private TileEntityChest theChest = new TileEntityChest();
    018
    019        /** Instance of Ender Chest's Tile Entity. */
    020        private TileEntityEnderChest theEnderChest = new TileEntityEnderChest();
    021
    022        /**
    023         * Renders a chest at 0,0,0 - used for item rendering
    024         */
    025        public void renderChest(Block par1Block, int par2, float par3)
    026        {
    027            if (par1Block.blockID == Block.enderChest.blockID)
    028            {
    029                TileEntityRenderer.instance.renderTileEntityAt(this.theEnderChest, 0.0D, 0.0D, 0.0D, 0.0F);
    030            }
    031            else
    032            {
    033                TileEntityRenderer.instance.renderTileEntityAt(this.theChest, 0.0D, 0.0D, 0.0D, 0.0F);
    034            }
    035        }
    036    }