本文整理汇总了Java中cpw.mods.fml.common.event.FMLInterModComms.IMCMessage方法的典型用法代码示例。如果您正苦于以下问题:Java FMLInterModComms.IMCMessage方法的具体用法?Java FMLInterModComms.IMCMessage怎么用?Java FMLInterModComms.IMCMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cpw.mods.fml.common.event.FMLInterModComms
的用法示例。
在下文中一共展示了FMLInterModComms.IMCMessage方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onIMC
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void onIMC(FMLInterModComms.IMCEvent event)
{
for(final FMLInterModComms.IMCMessage msg : event.getMessages())
{
if(msg.key.equals("addODBlacklisted"))
{
OreDictHandler.addBlacklisted( msg.getItemStackValue( ) );
}
}
}
示例2: processIMC
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void processIMC(List<FMLInterModComms.IMCMessage> messages)
{
for (FMLInterModComms.IMCMessage message : messages)
{
String type = message.key;
if ((type == null) || (type.isEmpty())) {}
}
}
示例3: interCommHandler
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
@EventHandler
public void interCommHandler(FMLInterModComms.IMCEvent event)
{
for (FMLInterModComms.IMCMessage message : event.getMessages())
if (message != null)
IMCHandler.handleMessage(message);
}
示例4: handleMessage
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void handleMessage(FMLInterModComms.IMCMessage message)
{
if (message.key.equalsIgnoreCase("linkItemAndIngredient"))
handleLinkMessage(message);
else if (message.key.equalsIgnoreCase("makeItemSandwichable"))
handleMakeSandwichableMessage(message);
else if (message.key.equalsIgnoreCase("addOvenRecipe"))
handleOvenRecipeMessage(message);
else if (message.key.equalsIgnoreCase("addPanRecipe"))
handlePanRecipeMessage(message);
else if (message.key.equalsIgnoreCase("addJam"))
handleJamMessage(message);
}
示例5: processIMC
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
@EventHandler
public void processIMC(FMLInterModComms.IMCEvent event) {
for (FMLInterModComms.IMCMessage message : event.getMessages()) {
if (message.key.equals("EyeNotification")) { // OpenEye IMC Payload
NBTTagCompound eyeTag = message.getNBTValue(),
nbt = new NBTTagCompound();
String[] eyeMsg = eyeTag.getString("payload").replace("#", " ").split(";");
if (eyeMsg.length != 6) {
advpLogger.error("Mod received malformed EyeNotification! This is most likely a bug on my side, don't worry about this");
}
nbt.setString("modDisplayName", "Advanced Potions");
nbt.setString("oldVersion", eyeMsg[0]);
nbt.setString("newVersion", eyeMsg[1]);
nbt.setString("updateUrl", eyeMsg[2]);
nbt.setBoolean("isDirectLink", Boolean.parseBoolean(eyeMsg[3]));
nbt.setString("changeLog", eyeMsg[4]);
nbt.setString("newFileName", eyeMsg[5]);
FMLInterModComms.sendMessage("VersionChecker", "addUpdate", nbt); // Send update notification to Dynious' Version Checker if present
}
}
}
示例6: processMessages
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void processMessages(List<FMLInterModComms.IMCMessage> messageList) {
for (FMLInterModComms.IMCMessage message : messageList) {
if (message.key.equalsIgnoreCase(ADD_GEM)) {
LogHelper.info("Adding gem from mod " + message.getSender());
if (message.isNBTMessage())
addGemFromNBT(message.getNBTValue());
} else if (message.key.equalsIgnoreCase(ADD_MATERIAL)) {
LogHelper.info("Adding ring material from mod " + message.getSender());
if (message.isNBTMessage())
addMaterialFromNBT(message.getNBTValue());
}
}
}
示例7: processIMC
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void processIMC(List<FMLInterModComms.IMCMessage> messages)
{
for(FMLInterModComms.IMCMessage message : messages) {
String type = message.key;
if (type == null || type.isEmpty())
continue;
}
}
示例8: processMessages
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void processMessages(List<FMLInterModComms.IMCMessage> messages)
{
for (FMLInterModComms.IMCMessage message : messages)
if (message.key.equals("addDimension") && message.isNBTMessage() && message.getNBTValue().hasKey("dimensionID") && !hasMessage(message.getNBTValue().getInteger("dimensionID")))
handleDimensionMessage(message.getNBTValue(), message.getSender());
}