    001    package cpw.mods.fml.client.registry;
    002
    003    import net.minecraft.src.TileEntity;
    004    import net.minecraft.src.TileEntityRenderer;
    005    import net.minecraft.src.TileEntitySpecialRenderer;
    006    import cpw.mods.fml.common.registry.GameRegistry;
    007
    008    public class ClientRegistry
    009    {
    010        /**
    011         *
    012         * Utility method for registering a tile entity and it's renderer at once - generally you should register them separately
    013         *
    014         * @param tileEntityClass
    015         * @param id
    016         * @param specialRenderer
    017         */
    018        public static void registerTileEntity(Class <? extends TileEntity > tileEntityClass, String id, TileEntitySpecialRenderer specialRenderer)
    019        {
    020            GameRegistry.registerTileEntity(tileEntityClass, id);
    021            bindTileEntitySpecialRenderer(tileEntityClass, specialRenderer);
    022        }
    023
    024        public static void bindTileEntitySpecialRenderer(Class <? extends TileEntity> tileEntityClass, TileEntitySpecialRenderer specialRenderer)
    025        {
    026            TileEntityRenderer.instance.specialRendererMap.put(tileEntityClass, specialRenderer);
    027            specialRenderer.setTileEntityRenderer(TileEntityRenderer.instance);
    028        }
    029    }