Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cpw.mods.fml.common
Class FMLCommonHandler

    java.lang.Object
      cpw.mods.fml.common.FMLCommonHandler

    public class FMLCommonHandler

extends Object

The main class for non-obfuscated hook handling code Anything that doesn't require obfuscated or client/server specific code should go in this handler It also contains a reference to the sided handler instance that is valid allowing for common code to access specific properties from the obfuscated world without a direct dependency

Author:
  cpw

Constructor Summary
`FMLCommonHandler()`

Method Summary
`void` | `adjustEntityLocationOnClient(EntitySpawnAdjustmentPacket entitySpawnAdjustmentPacket)`
`void` | `beginLoading(IFMLSidedHandler handler)`
`void` | `computeBranding()`
`void` | `enhanceCrashReport(CrashReport crashReport)`
`ModContainer` | `findContainerFor(Object mod)` Find the container that associates with the supplied mod object
`List<String>` | `getBrandings()`
`Side` | `getEffectiveSide()` Return the effective side for the context in the game.
`Logger` | `getFMLLogger()` Get the forge mod loader logging instance (goes to the forgemodloader log file)
`MinecraftServer` | `getMinecraftServerInstance()`
`Side` | `getSide()`
`IFMLSidedHandler` | `getSidedDelegate()`
`void` | `handleServerStarted()`
`void` | `handleServerStarting(MinecraftServer server)`
`void` | `handleServerStopping()`
`void` | `handleTinyPacket(NetHandler handler, Packet131MapData mapData)`
`void` | `handleWorldDataLoad(SaveHandler handler, WorldInfo worldInfo, NBTTagCompound tagCompound)`
`void` | `handleWorldDataSave(SaveHandler handler, WorldInfo worldInfo, NBTTagCompound tagCompound)`
`static FMLCommonHandler` | `instance()`
`void` | `onPlayerPostTick(EntityPlayer player)`
`void` | `onPlayerPreTick(EntityPlayer player)`
`void` | `onPostClientTick()`
`void` | `onPostServerTick()`
`void` | `onPostWorldTick(Object world)` Every tick just after world and other ticks occur
`void` | `onPreClientTick()`
`void` | `onPreServerTick()`
`void` | `onPreWorldTick(Object world)` Every tick just before world and other ticks occur
`void` | `onRenderTickEnd(float timer)`
`void` | `onRenderTickStart(float timer)`
`void` | `onServerStart(DedicatedServer dedicatedServer)`
`void` | `onServerStarted()`
`void` | `onWorldLoadTick(World[] worlds)`
`void` | `raiseException(Throwable exception, String message, boolean stopGame)` Raise an exception
`void` | `registerCrashCallable(ICrashCallable callable)`
`void` | `rescheduleTicks(Side side)`
`void` | `showGuiScreen(Object clientGuiElement)`
`Entity` | `spawnEntityIntoClientWorld(EntityRegistry.EntityRegistration registration, EntitySpawnPacket entitySpawnPacket)`
`void` | `tickEnd(EnumSet<TickType> ticks, Side side, Object... data)`
`void` | `tickStart(EnumSet<TickType> ticks, Side side, Object... data)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FMLCommonHandler

    public FMLCommonHandler()

Method Detail

### beginLoading

    public void beginLoading(IFMLSidedHandler handler)

### rescheduleTicks

    public void rescheduleTicks(Side side)

### tickStart

    public void tickStart(EnumSet<TickType> ticks,
                          Side side,
                          Object... data)

### tickEnd

    public void tickEnd(EnumSet<TickType> ticks,
                        Side side,
                        Object... data)

### instance

    public static FMLCommonHandler instance()

  Returns:
    the instance

### findContainerFor

    public ModContainer findContainerFor(Object mod)

  Find the container that associates with the supplied mod object

  Parameters:
    `mod` -

### getFMLLogger

    public Logger getFMLLogger()

  Get the forge mod loader logging instance (goes to the forgemodloader log file)

  Returns:
    The log instance for the FML log file

### getSide

    public Side getSide()

### getEffectiveSide

    public Side getEffectiveSide()

  Return the effective side for the context in the game. This is dependent on thread analysis to try and determine whether the code is running in the server or not. Use at your own risk

### raiseException

    public void raiseException(Throwable exception,
                               String message,
                               boolean stopGame)

  Raise an exception

### computeBranding

    public void computeBranding()

### getBrandings

    public List<String> getBrandings()

### getSidedDelegate

    public IFMLSidedHandler getSidedDelegate()

### onPostServerTick

    public void onPostServerTick()

### onPostWorldTick

    public void onPostWorldTick(Object world)

  Every tick just after world and other ticks occur

### onPreServerTick

    public void onPreServerTick()

### onPreWorldTick

    public void onPreWorldTick(Object world)

  Every tick just before world and other ticks occur

### onWorldLoadTick

    public void onWorldLoadTick(World[] worlds)

### handleServerStarting

    public void handleServerStarting(MinecraftServer server)

### handleServerStarted

    public void handleServerStarted()

### handleServerStopping

    public void handleServerStopping()

### getMinecraftServerInstance

    public MinecraftServer getMinecraftServerInstance()

### showGuiScreen

    public void showGuiScreen(Object clientGuiElement)

### spawnEntityIntoClientWorld

    public Entity spawnEntityIntoClientWorld(EntityRegistry.EntityRegistration registration,
                                             EntitySpawnPacket entitySpawnPacket)

### adjustEntityLocationOnClient

    public void adjustEntityLocationOnClient(EntitySpawnAdjustmentPacket entitySpawnAdjustmentPacket)

### onServerStart

    public void onServerStart(DedicatedServer dedicatedServer)

### onServerStarted

    public void onServerStarted()

### onPreClientTick

    public void onPreClientTick()

### onPostClientTick

    public void onPostClientTick()

### onRenderTickStart

    public void onRenderTickStart(float timer)

### onRenderTickEnd

    public void onRenderTickEnd(float timer)

### onPlayerPreTick

    public void onPlayerPreTick(EntityPlayer player)

### onPlayerPostTick

    public void onPlayerPostTick(EntityPlayer player)

### registerCrashCallable

    public void registerCrashCallable(ICrashCallable callable)

### enhanceCrashReport

    public void enhanceCrashReport(CrashReport crashReport)

### handleTinyPacket

    public void handleTinyPacket(NetHandler handler,
                                 Packet131MapData mapData)

### handleWorldDataSave

    public void handleWorldDataSave(SaveHandler handler,
                                    WorldInfo worldInfo,
                                    NBTTagCompound tagCompound)

### handleWorldDataLoad

    public void handleWorldDataLoad(SaveHandler handler,
                                    WorldInfo worldInfo,
                                    NBTTagCompound tagCompound)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD