cpw.mods.fml.common.event
Class FMLInterModComms

java.lang.Object
  extended by cpw.mods.fml.common.event.FMLInterModComms

public class FMLInterModComms
extends Object

Simple intermod communications to receive simple messages directed at you from other mods

Author:
cpw

Nested Class Summary
static class FMLInterModComms.IMCEvent
          Subscribe to this event to receive your messages (they are sent between Mod.Init and Mod.PostInit)
static class FMLInterModComms.IMCMessage
          You will receive an instance of this for each message sent
 
Constructor Summary
FMLInterModComms()
           
 
Method Summary
static com.google.common.collect.ImmutableList<FMLInterModComms.IMCMessage> fetchRuntimeMessages(Object forMod)
          Retrieve any pending runtime messages for the mod
static boolean sendMessage(String modId, String key, ItemStack value)
           
static boolean sendMessage(String modId, String key, NBTTagCompound value)
           
static boolean sendMessage(String modId, String key, String value)
           
static void sendRuntimeMessage(Object sourceMod, String modId, String key, ItemStack value)
           
static void sendRuntimeMessage(Object sourceMod, String modId, String key, NBTTagCompound value)
           
static void sendRuntimeMessage(Object sourceMod, String modId, String key, String value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FMLInterModComms

public FMLInterModComms()
Method Detail

sendMessage

public static boolean sendMessage(String modId,
                                  String key,
                                  NBTTagCompound value)

sendMessage

public static boolean sendMessage(String modId,
                                  String key,
                                  ItemStack value)

sendMessage

public static boolean sendMessage(String modId,
                                  String key,
                                  String value)

sendRuntimeMessage

public static void sendRuntimeMessage(Object sourceMod,
                                      String modId,
                                      String key,
                                      NBTTagCompound value)

sendRuntimeMessage

public static void sendRuntimeMessage(Object sourceMod,
                                      String modId,
                                      String key,
                                      ItemStack value)

sendRuntimeMessage

public static void sendRuntimeMessage(Object sourceMod,
                                      String modId,
                                      String key,
                                      String value)

fetchRuntimeMessages

public static com.google.common.collect.ImmutableList<FMLInterModComms.IMCMessage> fetchRuntimeMessages(Object forMod)
Retrieve any pending runtime messages for the mod

Parameters:
forMod - The Mod.Instance of the Mod to fetch messages for
Returns:
any messages - the collection will never be null