cpw.mods.fml.client
Class FMLClientHandler

java.lang.Object
  extended by cpw.mods.fml.client.FMLClientHandler
All Implemented Interfaces:
IFMLSidedHandler

public class FMLClientHandler
extends Object
implements IFMLSidedHandler

Handles primary communication from hooked code into the system The FML entry point is #beginMinecraftLoading(MinecraftServer) called from MinecraftServer Obfuscated code should focus on this class and other members of the "server" (or "client") code The actual mod loading is handled at arms length by Loader It is expected that a similar class will exist for each target environment: Bukkit and Client side. It should not be directly modified.

Author:
cpw

Constructor Summary
FMLClientHandler()
           
 
Method Summary
 void addSpecialModEntries(ArrayList<ModContainer> mods)
           
 void adjustEntityLocationOnClient(EntitySpawnAdjustmentPacket packet)
           
 void beginMinecraftLoading(Minecraft minecraft)
           
 void beginServerLoading(MinecraftServer server)
           
 void displayGuiScreen(EntityPlayer player, GuiScreen gui)
           
 void displayMissingMods(ModMissingPacket modMissingPacket)
           
 void finishMinecraftLoading()
          Called a bit later on during initialization to finish loading mods Also initializes key bindings
 void finishServerLoading()
           
 List<String> getAdditionalBrandingInformation()
           
 Minecraft getClient()
          Get the server instance
 Logger getMinecraftLogger()
          Get a handle to the client's logger instance The client actually doesn't have one- so we return null
 MinecraftServer getServer()
           
 Side getSide()
           
 void haltGame(String message, Throwable t)
           
 boolean hasOptifine()
           
static FMLClientHandler instance()
           
 boolean isLoading()
          If the client is in the midst of loading, we disable saving so that custom settings aren't wiped out
 void onInitializationComplete()
           
 void sendPacket(Packet packet)
           
 void showGuiScreen(Object clientGuiElement)
           
 Entity spawnEntityIntoClientWorld(EntityRegistry.EntityRegistration er, EntitySpawnPacket packet)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FMLClientHandler

public FMLClientHandler()
Method Detail

beginMinecraftLoading

public void beginMinecraftLoading(Minecraft minecraft)

haltGame

public void haltGame(String message,
                     Throwable t)
Specified by:
haltGame in interface IFMLSidedHandler

finishMinecraftLoading

public void finishMinecraftLoading()
Called a bit later on during initialization to finish loading mods Also initializes key bindings


onInitializationComplete

public void onInitializationComplete()

getClient

public Minecraft getClient()
Get the server instance

Returns:

getMinecraftLogger

public Logger getMinecraftLogger()
Get a handle to the client's logger instance The client actually doesn't have one- so we return null


instance

public static FMLClientHandler instance()
Returns:
the instance

displayGuiScreen

public void displayGuiScreen(EntityPlayer player,
                             GuiScreen gui)
Parameters:
player -
gui -

addSpecialModEntries

public void addSpecialModEntries(ArrayList<ModContainer> mods)
Parameters:
mods -

getAdditionalBrandingInformation

public List<String> getAdditionalBrandingInformation()
Specified by:
getAdditionalBrandingInformation in interface IFMLSidedHandler

getSide

public Side getSide()
Specified by:
getSide in interface IFMLSidedHandler

hasOptifine

public boolean hasOptifine()

showGuiScreen

public void showGuiScreen(Object clientGuiElement)
Specified by:
showGuiScreen in interface IFMLSidedHandler

spawnEntityIntoClientWorld

public Entity spawnEntityIntoClientWorld(EntityRegistry.EntityRegistration er,
                                         EntitySpawnPacket packet)
Specified by:
spawnEntityIntoClientWorld in interface IFMLSidedHandler

adjustEntityLocationOnClient

public void adjustEntityLocationOnClient(EntitySpawnAdjustmentPacket packet)
Specified by:
adjustEntityLocationOnClient in interface IFMLSidedHandler

beginServerLoading

public void beginServerLoading(MinecraftServer server)
Specified by:
beginServerLoading in interface IFMLSidedHandler

finishServerLoading

public void finishServerLoading()
Specified by:
finishServerLoading in interface IFMLSidedHandler

getServer

public MinecraftServer getServer()
Specified by:
getServer in interface IFMLSidedHandler

sendPacket

public void sendPacket(Packet packet)
Specified by:
sendPacket in interface IFMLSidedHandler

displayMissingMods

public void displayMissingMods(ModMissingPacket modMissingPacket)
Specified by:
displayMissingMods in interface IFMLSidedHandler

isLoading

public boolean isLoading()
If the client is in the midst of loading, we disable saving so that custom settings aren't wiped out

Returns: