cpw.mods.fml.client
Class FMLClientHandler
java.lang.Object
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
FMLClientHandler
public FMLClientHandler()
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:
handleTinyPacket
public void handleTinyPacket(NetHandler handler,
Packet131MapData mapData)
- Specified by:
handleTinyPacket
in interface IFMLSidedHandler
setClientCompatibilityLevel
public void setClientCompatibilityLevel(byte compatibilityLevel)
- Specified by:
setClientCompatibilityLevel
in interface IFMLSidedHandler
getClientCompatibilityLevel
public byte getClientCompatibilityLevel()
- Specified by:
getClientCompatibilityLevel
in interface IFMLSidedHandler