package client.renderer.tileentity;

import common.init.Items;
import common.item.ItemStack;
import common.tileentity.TileEntityBanner;
import common.tileentity.TileEntityChest;

public class TileEntityItemStackRenderer {
	public static TileEntityItemStackRenderer instance = new TileEntityItemStackRenderer();

	private final TileEntityChest chest = new TileEntityChest(0);
	private final TileEntityChest trapChest = new TileEntityChest(1);
	private final TileEntityBanner banner = new TileEntityBanner();

	public void renderByItem(ItemStack stack) {
		if(stack.getItem() == Items.banner) {
			this.banner.setItemValues(stack);
			TileEntityRendererDispatcher.instance.renderTileEntityAt(this.banner, 0.0D, 0.0D, 0.0D, 0.0F);
		}
		else if(stack.getItem() == Items.trapped_chest) {
			TileEntityRendererDispatcher.instance.renderTileEntityAt(this.trapChest, 0.0D, 0.0D, 0.0D, 0.0F);
		}
		else if(stack.getItem() == Items.chest) {
			TileEntityRendererDispatcher.instance.renderTileEntityAt(this.chest, 0.0D, 0.0D, 0.0D, 0.0F);
		}
	}
}
