    001/*
    002 * Forge Mod Loader
    003 * Copyright (c) 2012-2013 cpw.
    004 * All rights reserved. This program and the accompanying materials
    005 * are made available under the terms of the GNU Lesser Public License v2.1
    006 * which accompanies this distribution, and is available at
    007 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    008 *
    009 * Contributors:
    010 *     cpw - implementation
    011 */
    012
    013package net.minecraft.src;
    014
    015import java.awt.Dimension;
    016import java.util.List;
    017import java.util.logging.Level;
    018import java.util.logging.Logger;
    019
    020import net.minecraft.block.Block;
    021import net.minecraft.client.renderer.RenderBlocks;
    022import net.minecraft.client.renderer.RenderEngine;
    023import net.minecraft.client.texturepacks.ITexturePack;
    024import net.minecraft.world.IBlockAccess;
    025
    026import cpw.mods.fml.client.TextureFXManager;
    027import cpw.mods.fml.client.registry.RenderingRegistry;
    028import cpw.mods.fml.common.FMLLog;
    029
    030/**
    031 *
    032 * A static hook library for optifine and other basemod editing code to access FML functions
    033 *
    034 * @author cpw
    035 *
    036 */
    037public class FMLRenderAccessLibrary
    038{
    039    public static Logger getLogger()
    040    {
    041        Logger l = Logger.getLogger("FMLRenderAccessLibrary");
    042        l.setParent(FMLLog.getLogger());
    043        return l;
    044    }
    045
    046    public static void log(Level level, String message)
    047    {
    048        FMLLog.log("FMLRenderAccessLibrary", level, message);
    049    }
    050
    051    public static void log(Level level, String message, Throwable throwable)
    052    {
    053        FMLLog.log(level, throwable, message);
    054    }
    055
    056    @SuppressWarnings("deprecation")
    057    public static boolean renderWorldBlock(RenderBlocks renderer, IBlockAccess world, int x, int y, int z, Block block, int modelId)
    058    {
    059        return RenderingRegistry.instance().renderWorldBlock(renderer, world, x, y, z, block, modelId);
    060    }
    061
    062    @SuppressWarnings("deprecation")
    063    public static void renderInventoryBlock(RenderBlocks renderer, Block block, int metadata, int modelID)
    064    {
    065        RenderingRegistry.instance().renderInventoryBlock(renderer, block, metadata, modelID);
    066    }
    067
    068    @SuppressWarnings("deprecation")
    069    public static boolean renderItemAsFull3DBlock(int modelId)
    070    {
    071        return RenderingRegistry.instance().renderItemAsFull3DBlock(modelId);
    072    }
    073}