當前位置: 首頁>>代碼示例>>Java>>正文


Java FMLInterModComms.IMCMessage方法代碼示例

本文整理匯總了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( ) );
        }
    }
}
 
開發者ID:Technici4n,項目名稱:ProjectU,代碼行數:11,代碼來源:IMCHandlerProjectU.java

示例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())) {}
    }
}
 
開發者ID:AdvancedMods,項目名稱:AMCore,代碼行數:9,代碼來源:IMCHandler.java

示例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);
}
 
開發者ID:MrSpring,項目名稱:TheKitchenMod,代碼行數:8,代碼來源:Kitchen.java

示例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);
}
 
開發者ID:MrSpring,項目名稱:TheKitchenMod,代碼行數:14,代碼來源:IMCHandler.java

示例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


        }

    }
}
 
開發者ID:meew0,項目名稱:AdvancedPotions,代碼行數:28,代碼來源:AdvancedPotions.java

示例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());
        }
    }
}
 
開發者ID:Lomeli12,項目名稱:MagicalRings,代碼行數:14,代碼來源:IMCHelper.java

示例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;
    }
}
 
開發者ID:Dennisbonke,項目名稱:DBLibOld,代碼行數:9,代碼來源:IMCHandler.java

示例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());
}
 
開發者ID:UniversalTeam,項目名稱:FlatBedrock,代碼行數:7,代碼來源:IMCHandler.java


注:本文中的cpw.mods.fml.common.event.FMLInterModComms.IMCMessage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。