public class FMLClientHandler extends Object implements IFMLSidedHandler
#beginMinecraftLoading(Minecraft, List) called from
Minecraft
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.| Constructor and Description |
|---|
FMLClientHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addModAsResource(ModContainer container) |
void |
addSpecialModEntries(ArrayList<ModContainer> mods) |
void |
adjustEntityLocationOnClient(EntitySpawnAdjustmentPacket packet) |
void |
beginMinecraftLoading(Minecraft minecraft,
List resourcePackList,
ReloadableResourceManager resourceManager)
Called to start the whole game off
|
void |
beginServerLoading(MinecraftServer server) |
void |
callbackIdDifferenceResponse(boolean response) |
void |
disconnectIDMismatch(com.google.common.collect.MapDifference<Integer,ItemData> s,
NetHandler toKill,
INetworkManager mgr) |
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
|
byte |
getClientCompatibilityLevel() |
String |
getCurrentLanguage() |
Logger |
getMinecraftLogger()
Get a handle to the client's logger instance
The client actually doesn't have one- so we return null
|
ResourcePack |
getResourcePackFor(String modId) |
MinecraftServer |
getServer() |
Side |
getSide() |
void |
haltGame(String message,
Throwable t) |
void |
handleTinyPacket(NetHandler handler,
Packet131MapData mapData) |
boolean |
hasOptifine() |
static FMLClientHandler |
instance() |
boolean |
isGUIOpen(Class<? extends GuiScreen> gui)
Is this GUI type open?
|
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 |
setClientCompatibilityLevel(byte compatibilityLevel) |
boolean |
shouldServerShouldBeKilledQuietly() |
void |
showGuiScreen(Object clientGuiElement) |
Entity |
spawnEntityIntoClientWorld(EntityRegistry.EntityRegistration er,
EntitySpawnPacket packet) |
void |
updateResourcePackList() |
void |
warnIDMismatch(com.google.common.collect.MapDifference<Integer,ItemData> idDifferences,
boolean mayContinue) |
public void beginMinecraftLoading(Minecraft minecraft, List resourcePackList, ReloadableResourceManager resourceManager)
minecraft - The minecraft instance being launchedresourcePackList - The resource pack list we will populate with modsresourceManager - The resource managerpublic void haltGame(String message, Throwable t)
haltGame in interface IFMLSidedHandlerpublic void finishMinecraftLoading()
public void onInitializationComplete()
public Minecraft getClient()
public Logger getMinecraftLogger()
public static FMLClientHandler instance()
public void displayGuiScreen(EntityPlayer player, GuiScreen gui)
player - gui - public void addSpecialModEntries(ArrayList<ModContainer> mods)
mods - public List<String> getAdditionalBrandingInformation()
getAdditionalBrandingInformation in interface IFMLSidedHandlerpublic Side getSide()
getSide in interface IFMLSidedHandlerpublic boolean hasOptifine()
public void showGuiScreen(Object clientGuiElement)
showGuiScreen in interface IFMLSidedHandlerpublic Entity spawnEntityIntoClientWorld(EntityRegistry.EntityRegistration er, EntitySpawnPacket packet)
spawnEntityIntoClientWorld in interface IFMLSidedHandlerpublic void adjustEntityLocationOnClient(EntitySpawnAdjustmentPacket packet)
adjustEntityLocationOnClient in interface IFMLSidedHandlerpublic void beginServerLoading(MinecraftServer server)
beginServerLoading in interface IFMLSidedHandlerpublic void finishServerLoading()
finishServerLoading in interface IFMLSidedHandlerpublic MinecraftServer getServer()
getServer in interface IFMLSidedHandlerpublic void sendPacket(Packet packet)
sendPacket in interface IFMLSidedHandlerpublic void displayMissingMods(ModMissingPacket modMissingPacket)
displayMissingMods in interface IFMLSidedHandlerpublic boolean isLoading()
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
handleTinyPacket in interface IFMLSidedHandlerpublic void setClientCompatibilityLevel(byte compatibilityLevel)
setClientCompatibilityLevel in interface IFMLSidedHandlerpublic byte getClientCompatibilityLevel()
getClientCompatibilityLevel in interface IFMLSidedHandlerpublic void warnIDMismatch(com.google.common.collect.MapDifference<Integer,ItemData> idDifferences, boolean mayContinue)
public void callbackIdDifferenceResponse(boolean response)
public boolean shouldServerShouldBeKilledQuietly()
shouldServerShouldBeKilledQuietly in interface IFMLSidedHandlerpublic void disconnectIDMismatch(com.google.common.collect.MapDifference<Integer,ItemData> s, NetHandler toKill, INetworkManager mgr)
disconnectIDMismatch in interface IFMLSidedHandlerpublic boolean isGUIOpen(Class<? extends GuiScreen> gui)
gui - The type of GUI to test forpublic void addModAsResource(ModContainer container)
addModAsResource in interface IFMLSidedHandlerpublic void updateResourcePackList()
updateResourcePackList in interface IFMLSidedHandlerpublic ResourcePack getResourcePackFor(String modId)
public String getCurrentLanguage()
getCurrentLanguage in interface IFMLSidedHandler