public class FMLClientHandler extends java.lang.Object implements IFMLSidedHandler
beginMinecraftLoading(Minecraft, List, IReloadableResourceManager)
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(java.util.ArrayList<ModContainer> mods) |
void |
allowLogins() |
void |
beginMinecraftLoading(Minecraft minecraft,
java.util.List<IResourcePack> resourcePackList,
IReloadableResourceManager resourceManager)
Called to start the whole game off
|
void |
beginServerLoading(MinecraftServer server) |
void |
bindServerListData(ServerData data,
ServerStatusResponse originalResponse) |
void |
captureAdditionalData(ServerStatusResponse serverstatusresponse,
com.google.gson.JsonObject jsonobject) |
void |
connectToRealmsServer(java.lang.String host,
int port) |
void |
connectToServer(GuiScreen guiMultiplayer,
ServerData serverEntry) |
void |
connectToServerAtStartup(java.lang.String host,
int port) |
void |
displayGuiScreen(EntityPlayer player,
GuiScreen gui) |
void |
displayMissingMods(java.lang.Object modMissingPacket) |
java.lang.String |
enhanceServerListEntry(ServerListEntryNormal serverListEntry,
ServerData serverEntry,
int x,
int width,
int y,
int relativeMouseX,
int relativeMouseY) |
void |
extendModList() |
void |
finishMinecraftLoading()
Called a bit later on during initialization to finish loading mods
Also initializes key bindings
|
void |
finishServerLoading() |
void |
fireNetRegistrationEvent(EventBus bus,
NetworkManager manager,
java.util.Set<java.lang.String> channelSet,
java.lang.String channel,
Side side) |
java.lang.String |
fixDescription(java.lang.String description) |
java.util.List<java.lang.String> |
getAdditionalBrandingInformation() |
Minecraft |
getClient()
Get the server instance
|
EntityPlayerSP |
getClientPlayerEntity() |
INetHandler |
getClientPlayHandler() |
NetworkManager |
getClientToServerNetworkManager() |
java.lang.String |
getCurrentLanguage() |
IModGuiFactory |
getGuiFactoryFor(ModContainer selectedMod) |
IResourcePack |
getResourcePackFor(java.lang.String modId) |
java.io.File |
getSavesDir() |
java.io.File |
getSavesDirectory() |
MinecraftServer |
getServer() |
Side |
getSide() |
WorldClient |
getWorldClient() |
IThreadListener |
getWorldThread(INetHandler net) |
void |
haltGame(java.lang.String message,
java.lang.Throwable t) |
void |
handleClientWorldClosing(WorldClient world) |
boolean |
handleLoadingScreen(ScaledResolution scaledResolution) |
boolean |
hasOptifine() |
static FMLClientHandler |
instance() |
boolean |
isGUIOpen(java.lang.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 |
logMissingTextureErrors() |
void |
onInitializationComplete() |
void |
processWindowMessages() |
void |
queryUser(StartupQuery query) |
void |
serverStopped() |
void |
setPlayClient(NetHandlerPlayClient netHandlerPlayClient) |
void |
setupServerList() |
boolean |
shouldAllowPlayerLogins() |
boolean |
shouldServerShouldBeKilledQuietly() |
void |
showGuiScreen(java.lang.Object clientGuiElement) |
void |
showInGameModOptions(GuiIngameMenu guiIngameMenu) |
void |
startIntegratedServer(java.lang.String id,
java.lang.String name,
WorldSettings settings) |
java.lang.String |
stripSpecialChars(java.lang.String message) |
void |
trackBrokenTexture(ResourceLocation resourceLocation,
java.lang.String error) |
void |
trackMissingTexture(ResourceLocation resourceLocation) |
void |
tryLoadExistingWorld(GuiWorldSelection selectWorldGUI,
WorldSummary comparator) |
public void beginMinecraftLoading(Minecraft minecraft, java.util.List<IResourcePack> resourcePackList, IReloadableResourceManager resourceManager)
minecraft
- The minecraft instance being launchedresourcePackList
- The resource pack list we will populate with modsresourceManager
- The resource managerpublic void haltGame(java.lang.String message, java.lang.Throwable t)
haltGame
in interface IFMLSidedHandler
public void finishMinecraftLoading()
public void extendModList()
public void onInitializationComplete()
public Minecraft getClient()
public static FMLClientHandler instance()
public void displayGuiScreen(EntityPlayer player, GuiScreen gui)
player
- gui
- public void addSpecialModEntries(java.util.ArrayList<ModContainer> mods)
mods
- public java.util.List<java.lang.String> getAdditionalBrandingInformation()
getAdditionalBrandingInformation
in interface IFMLSidedHandler
public Side getSide()
getSide
in interface IFMLSidedHandler
public boolean hasOptifine()
public void showGuiScreen(java.lang.Object clientGuiElement)
showGuiScreen
in interface IFMLSidedHandler
public void queryUser(StartupQuery query) throws java.lang.InterruptedException
queryUser
in interface IFMLSidedHandler
java.lang.InterruptedException
public boolean handleLoadingScreen(ScaledResolution scaledResolution) throws java.io.IOException
java.io.IOException
public WorldClient getWorldClient()
public EntityPlayerSP getClientPlayerEntity()
public void beginServerLoading(MinecraftServer server)
beginServerLoading
in interface IFMLSidedHandler
public void finishServerLoading()
finishServerLoading
in interface IFMLSidedHandler
public java.io.File getSavesDirectory()
getSavesDirectory
in interface IFMLSidedHandler
public MinecraftServer getServer()
getServer
in interface IFMLSidedHandler
public void displayMissingMods(java.lang.Object modMissingPacket)
public boolean isLoading()
public boolean shouldServerShouldBeKilledQuietly()
shouldServerShouldBeKilledQuietly
in interface IFMLSidedHandler
public boolean isGUIOpen(java.lang.Class<? extends GuiScreen> gui)
gui
- The type of GUI to test forpublic void addModAsResource(ModContainer container)
addModAsResource
in interface IFMLSidedHandler
public IResourcePack getResourcePackFor(java.lang.String modId)
public java.lang.String getCurrentLanguage()
getCurrentLanguage
in interface IFMLSidedHandler
public void serverStopped()
serverStopped
in interface IFMLSidedHandler
public INetHandler getClientPlayHandler()
getClientPlayHandler
in interface IFMLSidedHandler
public NetworkManager getClientToServerNetworkManager()
getClientToServerNetworkManager
in interface IFMLSidedHandler
public void handleClientWorldClosing(WorldClient world)
public void startIntegratedServer(java.lang.String id, java.lang.String name, WorldSettings settings)
public java.io.File getSavesDir()
public void tryLoadExistingWorld(GuiWorldSelection selectWorldGUI, WorldSummary comparator)
public void showInGameModOptions(GuiIngameMenu guiIngameMenu)
public IModGuiFactory getGuiFactoryFor(ModContainer selectedMod)
public void setupServerList()
public void captureAdditionalData(ServerStatusResponse serverstatusresponse, com.google.gson.JsonObject jsonobject)
public void bindServerListData(ServerData data, ServerStatusResponse originalResponse)
public java.lang.String enhanceServerListEntry(ServerListEntryNormal serverListEntry, ServerData serverEntry, int x, int width, int y, int relativeMouseX, int relativeMouseY)
public java.lang.String fixDescription(java.lang.String description)
public void connectToServerAtStartup(java.lang.String host, int port)
public void connectToServer(GuiScreen guiMultiplayer, ServerData serverEntry)
public void connectToRealmsServer(java.lang.String host, int port)
public void setPlayClient(NetHandlerPlayClient netHandlerPlayClient)
public void fireNetRegistrationEvent(EventBus bus, NetworkManager manager, java.util.Set<java.lang.String> channelSet, java.lang.String channel, Side side)
fireNetRegistrationEvent
in interface IFMLSidedHandler
public boolean shouldAllowPlayerLogins()
shouldAllowPlayerLogins
in interface IFMLSidedHandler
public void allowLogins()
allowLogins
in interface IFMLSidedHandler
public IThreadListener getWorldThread(INetHandler net)
getWorldThread
in interface IFMLSidedHandler
public void trackMissingTexture(ResourceLocation resourceLocation)
public void trackBrokenTexture(ResourceLocation resourceLocation, java.lang.String error)
public void logMissingTextureErrors()
public void processWindowMessages()
processWindowMessages
in interface IFMLSidedHandler
public java.lang.String stripSpecialChars(java.lang.String message)
stripSpecialChars
in interface IFMLSidedHandler