2012-05-25 22:13:51 -04:00
/*
* The FML Forge Mod Loader suite.
* Copyright (C) 2012 cpw
*
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraft.src ;
import java.awt.Dimension ;
import java.util.List ;
2012-06-05 18:49:07 -07:00
import java.util.logging.Level ;
2012-05-31 22:09:45 -04:00
import java.util.logging.Logger ;
2012-05-25 22:13:51 -04:00
import cpw.mods.fml.client.FMLClientHandler ;
2012-05-31 22:09:45 -04:00
import cpw.mods.fml.common.FMLCommonHandler ;
2012-05-25 22:13:51 -04:00
/**
*
* A static hook library for optifine and other basemod editing code to access FML functions
*
* @author cpw
*
*/
public class FMLRenderAccessLibrary
{
2012-05-31 22:09:45 -04:00
public static Logger getLogger ()
{
return FMLCommonHandler . instance (). getFMLLogger ();
}
2012-06-05 18:49:07 -07:00
public static void log ( Level level , String message )
{
getLogger (). log ( level , message );
}
public static void log ( Level level , String message , Throwable throwable )
{
getLogger (). log ( level , message , throwable );
}
2012-05-25 22:13:51 -04:00
public static void setTextureDimensions ( int textureId , int width , int height , List < TextureFX > textureFXList )
{
FMLClientHandler . instance (). setTextureDimensions ( textureId , width , height , textureFXList );
}
public static void preRegisterEffect ( TextureFX textureFX )
{
FMLClientHandler . instance (). onPreRegisterEffect ( textureFX );
}
public static boolean onUpdateTextureEffect ( TextureFX textureFX )
{
return FMLClientHandler . instance (). onUpdateTextureEffect ( textureFX );
}
public static Dimension getTextureDimensions ( TextureFX textureFX )
{
return FMLClientHandler . instance (). getTextureDimensions ( textureFX );
}
public static void onTexturePackChange ( RenderEngine engine , TexturePackBase texturePack , List < TextureFX > textureFXList )
{
FMLClientHandler . instance (). onTexturePackChange ( engine , texturePack , textureFXList );
}
public static boolean renderWorldBlock ( RenderBlocks renderer , IBlockAccess world , int x , int y , int z , Block block , int modelId )
{
return FMLClientHandler . instance (). renderWorldBlock ( renderer , world , x , y , z , block , modelId );
}
public static void renderInventoryBlock ( RenderBlocks renderer , Block block , int metadata , int modelID )
{
FMLClientHandler . instance (). renderInventoryBlock ( renderer , block , metadata , modelID );
}
public static boolean renderItemAsFull3DBlock ( int modelId )
{
return FMLClientHandler . instance (). renderItemAsFull3DBlock ( modelId );
}
}