cpw.mods.fml.server
Class FMLServerHandler

java.lang.Object
  extended by cpw.mods.fml.server.FMLServerHandler
All Implemented Interfaces:
IFMLSidedHandler

public class FMLServerHandler
extends Object
implements IFMLSidedHandler

Handles primary communication from hooked code into the system The FML entry point is beginServerLoading(MinecraftServer) called from net.minecraft.shared.DedicatedServer 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

Method Summary
 void adjustEntityLocationOnClient(EntitySpawnAdjustmentPacket entitySpawnAdjustmentPacket)
           
 void beginServerLoading(MinecraftServer minecraftServer)
          Called to start the whole game off from MinecraftServer.startServer()
 void disconnectIDMismatch(com.google.common.collect.MapDifference<Integer,ItemData> s, NetHandler handler, INetworkManager mgr)
           
 void displayMissingMods(ModMissingPacket modMissingPacket)
           
 void finishServerLoading()
          Called a bit later on during server initialization to finish loading mods
 List<String> getAdditionalBrandingInformation()
           
 byte getClientCompatibilityLevel()
           
 MinecraftServer getServer()
          Get the server instance
 Side getSide()
           
 void haltGame(String message, Throwable exception)
           
 void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
           
static FMLServerHandler instance()
           
 void sendPacket(Packet packet)
           
 void setClientCompatibilityLevel(byte compatibilityLevel)
           
 boolean shouldServerShouldBeKilledQuietly()
           
 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
 

Method Detail

beginServerLoading

public void beginServerLoading(MinecraftServer minecraftServer)
Called to start the whole game off from MinecraftServer.startServer()

Specified by:
beginServerLoading in interface IFMLSidedHandler
Parameters:
minecraftServer -

finishServerLoading

public void finishServerLoading()
Called a bit later on during server initialization to finish loading mods

Specified by:
finishServerLoading in interface IFMLSidedHandler

haltGame

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

getServer

public MinecraftServer getServer()
Get the server instance

Specified by:
getServer in interface IFMLSidedHandler

instance

public static FMLServerHandler instance()
Returns:
the instance

getAdditionalBrandingInformation

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

getSide

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

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 entitySpawnAdjustmentPacket)
Specified by:
adjustEntityLocationOnClient 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

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

shouldServerShouldBeKilledQuietly

public boolean shouldServerShouldBeKilledQuietly()
Specified by:
shouldServerShouldBeKilledQuietly in interface IFMLSidedHandler

disconnectIDMismatch

public void disconnectIDMismatch(com.google.common.collect.MapDifference<Integer,ItemData> s,
                                 NetHandler handler,
                                 INetworkManager mgr)
Specified by:
disconnectIDMismatch in interface IFMLSidedHandler