Java 类cpw.mods.fml.common.event.FMLInterModComms 实例源码

项目:ExtraUtilities    文件:TE4IMC.java   
public static void addSmelter(int energy, final ItemStack a, final ItemStack b, final ItemStack output, final ItemStack altOutput, final int prob) {
    if (a == null || b == null || output == null) {
        return;
    }
    if (energy <= 0) {
        energy = 4000;
    }
    final NBTTagCompound tag = new NBTTagCompound();
    tag.setInteger("energy", energy);
    tag.setTag("primaryInput", (NBTBase)getItemStackNBT(a));
    tag.setTag("secondaryInput", (NBTBase)getItemStackNBT(b));
    tag.setTag("primaryOutput", (NBTBase)getItemStackNBT(output));
    if (altOutput != null) {
        tag.setTag("secondaryOutput", (NBTBase)getItemStackNBT(altOutput));
        tag.setInteger("secondaryChance", prob);
    }
    FMLInterModComms.sendMessage("ThermalExpansion", "SmelterRecipe", tag);
}
项目:TRHS_Club_Mod_2016    文件:Loader.java   
public void initializeMods()
{
    progressBar.step("Initializing mods Phase 2");
    // Mod controller should be in the initialization state here
    modController.distributeStateMessage(LoaderState.INITIALIZATION);
    progressBar.step("Initializing mods Phase 3");
    modController.transition(LoaderState.POSTINITIALIZATION, false);
    modController.distributeStateMessage(FMLInterModComms.IMCEvent.class);
    ItemStackHolderInjector.INSTANCE.inject();
    modController.distributeStateMessage(LoaderState.POSTINITIALIZATION);
    progressBar.step("Finishing up");
    modController.transition(LoaderState.AVAILABLE, false);
    modController.distributeStateMessage(LoaderState.AVAILABLE);
    GameData.freezeData();
    // Dump the custom registry data map, if necessary
    GameData.dumpRegistry(minecraftDir);
    FMLLog.info("Forge Mod Loader has successfully loaded %d mod%s", mods.size(), mods.size() == 1 ? "" : "s");
    progressBar.step("Completing Minecraft initialization");
}
项目:RorysMod    文件:ClientProxy.java   
@Override
public void init(FMLInitializationEvent e) {
    super.init(e);
    Register.registerGlobalEntityID(EntityLaser.class, "laser");

    Register.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser());

    Register.registerItemRenderer(RorysMod.items.rifle1, new RenderRifle());
    Register.registerItemRenderer(RorysMod.items.rifle2, new RenderRifle());
    Register.registerItemRenderer(RorysMod.items.rifle3, new RenderRifle());
    Register.registerItemRenderer(RorysMod.items.rifle4, new RenderRifle());
    Register.registerItemRenderer(RorysMod.items.rifle5, new RenderRifle());

    TileEntitySpecialRenderer render = new RenderRifleTable();
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRifleTable.class, render);
    Register.registerItemRenderer(Item.getItemFromBlock(RorysMod.blocks.upgradeTable), new ItemRender(render, new TileEntityRifleTable()));

    render = new RenderPoweredChest();
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPoweredChest.class, render);

    FMLInterModComms.sendMessage("Waila", "register", WailaConfig.class.getName() + ".callbackRegister");
}
项目:RorysMod    文件:Register.java   
public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {
    if (input == null || primaryOutput == null) {
        return;
    }
    NBTTagCompound toSend = new NBTTagCompound();
    toSend.setInteger("energy", energy);
    toSend.setTag("input", new NBTTagCompound());
    toSend.setTag("primaryOutput", new NBTTagCompound());
    if (secondaryOutput != null) {
        toSend.setTag("secondaryOutput", new NBTTagCompound());
    }
    input.writeToNBT(toSend.getCompoundTag("input"));
    primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));
    if (secondaryOutput != null) {
        secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
        toSend.setInteger("secondaryChance", secondaryChance);
    }
    boolean bool = FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", toSend);
    if (bool) recipies++;
}
项目:RorysMod    文件:Register.java   
public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {
    NBTTagCompound data = new NBTTagCompound();
    data.setInteger("energy", energy);
    NBTTagCompound input1Compound = new NBTTagCompound();
    primaryInput.writeToNBT(input1Compound);
    data.setTag("primaryInput", input1Compound);

    NBTTagCompound input2Compound = new NBTTagCompound();
    secondaryInput.writeToNBT(input2Compound);
    data.setTag("secondaryInput", input2Compound);

    NBTTagCompound output1Compound = new NBTTagCompound();
    primaryOutput.writeToNBT(output1Compound);
    data.setTag("primaryOutput", output1Compound);

    if (secondaryOutput != null) {
        NBTTagCompound output2Compound = new NBTTagCompound();
        secondaryOutput.writeToNBT(output2Compound);
        data.setTag("secondaryOutput", output2Compound);

        data.setInteger("secondaryChance", secondaryChance);
    }
    boolean bool = FMLInterModComms.sendMessage("ThermalExpansion", "SmelterRecipe", data);
    if (bool) recipies++;
}
项目:NewHorizonsCoreMod    文件:GT_CustomLoader.java   
private void fixEnderIO(){
    //Example of how to add a recipe:

    NBTTagCompound root = new NBTTagCompound();
    root.setString(SoulBinderRecipeManager.KEY_RECIPE_UID, "sentientEnderMK2");
    root.setInteger(SoulBinderRecipeManager.KEY_REQUIRED_ENERGY, 100000);
    root.setInteger(SoulBinderRecipeManager.KEY_REQUIRED_XP, 10);
    root.setString(SoulBinderRecipeManager.KEY_SOUL_TYPES, "SpecialMobs.SpecialWitch");
    ItemStack is = new ItemStack(EnderIO.itemFrankenSkull, 1, FrankenSkull.ENDER_RESONATOR.ordinal());
    NBTTagCompound stackRoot = new NBTTagCompound();
    is.writeToNBT(stackRoot);
    root.setTag(SoulBinderRecipeManager.KEY_INPUT_STACK, stackRoot);
    is = new ItemStack(EnderIO.itemFrankenSkull, 1, FrankenSkull.SENTIENT_ENDER.ordinal());
    stackRoot = new NBTTagCompound();
    is.writeToNBT(stackRoot);
    root.setTag(SoulBinderRecipeManager.KEY_OUTPUT_STACK, stackRoot);

    SoulBinderRecipeManager.getInstance().addRecipeFromNBT(root);
    FMLInterModComms.sendMessage("EnderIO",  "recipe:soulbinder", root);

}
项目:ModpackInfo    文件:VersionCheck.java   
public static void register() {

        if (Loader.isModLoaded("VersionChecker")) {
            final NBTTagCompound nbt = new NBTTagCompound();
            nbt.setString("curseProjectName", CURSE_PROJECT_NAME);
            nbt.setString("curseFilenameParser", MOD_NAME_TEMPLATE);
            FMLInterModComms.sendRuntimeMessage(ModpackInfo.MOD_ID,
                    "VersionChecker", "addVersionCheck", nbt);
        }

        if (ModOptions.getOnlineVersionChecking()) {
            final VersionCheck test = new VersionCheck();
            FMLCommonHandler.instance().bus().register(test);
            new Thread(test).start();
        }
    }
项目:Augury    文件:ThermalExpansionHelper.java   
public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {

        if (input == null || primaryOutput == null) {
            return;
        }
        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setTag("input", new NBTTagCompound());
        toSend.setTag("primaryOutput", new NBTTagCompound());

        if (secondaryOutput != null) {
            toSend.setTag("secondaryOutput", new NBTTagCompound());
        }

        input.writeToNBT(toSend.getCompoundTag("input"));
        primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));

        if (secondaryOutput != null) {
            secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
            toSend.setInteger("secondaryChance", secondaryChance);
        }

        FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", toSend);
    }
项目:Augury    文件:ThermalExpansionHelper.java   
public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {

        if (input == null || primaryOutput == null) {
            return;
        }
        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setTag("input", new NBTTagCompound());
        toSend.setTag("primaryOutput", new NBTTagCompound());

        if (secondaryOutput != null) {
            toSend.setTag("secondaryOutput", new NBTTagCompound());
        }

        input.writeToNBT(toSend.getCompoundTag("input"));
        primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));

        if (secondaryOutput != null) {
            secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
            toSend.setInteger("secondaryChance", secondaryChance);
        }

        FMLInterModComms.sendMessage("ThermalExpansion", "SawmillRecipe", toSend);
    }
项目:Augury    文件:ThermalExpansionHelper.java   
public static void addCrucibleRecipe(int energy, ItemStack input, FluidStack output) {

        if (input == null || output == null) {
            return;
        }
        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setTag("input", new NBTTagCompound());
        toSend.setTag("output", new NBTTagCompound());

        input.writeToNBT(toSend.getCompoundTag("input"));
        output.writeToNBT(toSend.getCompoundTag("output"));

        FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
    }
项目:Augury    文件:ThermalExpansionHelper.java   
public static void addTransposerFill(int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible) {

        if (input == null || output == null || fluid == null) {
            return;
        }
        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setTag("input", new NBTTagCompound());
        toSend.setTag("output", new NBTTagCompound());
        toSend.setTag("fluid", new NBTTagCompound());

        input.writeToNBT(toSend.getCompoundTag("input"));
        output.writeToNBT(toSend.getCompoundTag("output"));
        toSend.setBoolean("reversible", reversible);
        fluid.writeToNBT(toSend.getCompoundTag("fluid"));

        FMLInterModComms.sendMessage("ThermalExpansion", "TransposerFillRecipe", toSend);
    }
项目:Augury    文件:ThermalExpansionHelper.java   
public static void addTransposerExtract(int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible) {

        if (input == null || output == null || fluid == null) {
            return;
        }
        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setTag("input", new NBTTagCompound());
        toSend.setTag("output", new NBTTagCompound());
        toSend.setTag("fluid", new NBTTagCompound());

        input.writeToNBT(toSend.getCompoundTag("input"));
        output.writeToNBT(toSend.getCompoundTag("output"));
        toSend.setBoolean("reversible", reversible);
        toSend.setInteger("chance", chance);
        fluid.writeToNBT(toSend.getCompoundTag("fluid"));

        FMLInterModComms.sendMessage("ThermalExpansion", "TransposerExtractRecipe", toSend);
    }
项目:RFDrills    文件:EnderIOCompat.java   
public static void addAlloySmelterRecipe(String name, int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack tertiaryInput, ItemStack output) {
    StringBuilder toSend = new StringBuilder();

    toSend.append("<recipeGroup name=\"" + Reference.MOD_ID + "\">");
        toSend.append("<recipe name=\"" + name + "\" energyCost=\"" + energy + "\">");
            toSend.append("<input>");
                writeItemStack(toSend, primaryInput);
                writeItemStack(toSend, secondaryInput);
                writeItemStack(toSend, tertiaryInput);
            toSend.append("</input>");
            toSend.append("<output>");
                writeItemStack(toSend, output);
            toSend.append("</output>");
        toSend.append("</recipe>");
    toSend.append("</recipeGroup>");

    FMLInterModComms.sendMessage("EnderIO", "recipe:alloysmelter", toSend.toString());
}
项目:ToggleBlocks    文件:ToggleBlocks.java   
@Mod.EventHandler
public static void init(FMLInitializationEvent event)
{
    if (Loader.isModLoaded("NotEnoughItems"))
    {
        try
        {
            System.out.println("Registering NEI comp.");
            codechicken.nei.NEIModContainer.plugins.add(new NEIToggleConfig());
        } catch (Exception ignored)
        {
        }
    }

    MinecraftForge.EVENT_BUS.register(new EventHandler());
    proxy.registerRenderer();
    FMLInterModComms.sendRuntimeMessage(ModInfo.MOD_ID, "VersionChecker", "addVersionCheck", "http://mrspring.dk/mods/tb/versions.json");
    FMLInterModComms.sendMessage("tb", "register", "dk.mrspring.toggle.comp.vanilla.ToggleRegistryCallback.register");
    FMLInterModComms.sendMessage("Waila", "register", "dk.mrspring.toggle.comp.waila.WailaCompatibility.callbackRegister");
    Recipes.register();
}
项目:vsminecraft    文件:MultipartMekanism.java   
public void registerMicroMaterials()
{
    for(int i = 0; i < 16; i++)
    {
        MicroMaterialRegistry.registerMaterial(new PlasticMicroMaterial(MekanismBlocks.PlasticBlock, i), BlockMicroMaterial.materialKey(MekanismBlocks.PlasticBlock, i));
        MicroMaterialRegistry.registerMaterial(new PlasticMicroMaterial(MekanismBlocks.GlowPlasticBlock, i), BlockMicroMaterial.materialKey(MekanismBlocks.GlowPlasticBlock, i));
        MicroMaterialRegistry.registerMaterial(new PlasticMicroMaterial(MekanismBlocks.SlickPlasticBlock, i), BlockMicroMaterial.materialKey(MekanismBlocks.SlickPlasticBlock, i));
        MicroMaterialRegistry.registerMaterial(new PlasticMicroMaterial(MekanismBlocks.ReinforcedPlasticBlock, i), BlockMicroMaterial.materialKey(MekanismBlocks.ReinforcedPlasticBlock, i));
        MicroMaterialRegistry.registerMaterial(new PlasticMicroMaterial(MekanismBlocks.RoadPlasticBlock, i), BlockMicroMaterial.materialKey(MekanismBlocks.RoadPlasticBlock, i));

        FMLInterModComms.sendMessage("ForgeMicroblock", "microMaterial", new ItemStack(MekanismBlocks.BasicBlock, 1, i));

        if(!MachineType.get(MACHINE_BLOCK_1, i).hasModel)
        {
            FMLInterModComms.sendMessage("ForgeMicroblock", "microMaterial", new ItemStack(MekanismBlocks.MachineBlock, 1, i));
        }

        if(!MachineType.get(MACHINE_BLOCK_2, i).hasModel)
        {
            FMLInterModComms.sendMessage("ForgeMicroblock", "microMaterial", new ItemStack(MekanismBlocks.MachineBlock2, 1, i));
        }
    }

    FMLInterModComms.sendMessage("ForgeMicroblock", "microMaterial", new ItemStack(MekanismBlocks.BasicBlock2, 1, 0));
    FMLInterModComms.sendMessage("ForgeMicroblock", "microMaterial", new ItemStack(MekanismBlocks.CardboardBox));
}
项目:PlayerInterfaceMod    文件:ThermalExpansionHelper.java   
/**
    * MACHINES
    */

/* Furnace */
   public static void addFurnaceRecipe(int energy, ItemStack input, ItemStack output) {

       if (input == null || output == null) {
           return;
       }
       NBTTagCompound toSend = new NBTTagCompound();

       toSend.setInteger("energy", energy);
       toSend.setTag("input", new NBTTagCompound());
       toSend.setTag("output", new NBTTagCompound());

       input.writeToNBT(toSend.getCompoundTag("input"));
       output.writeToNBT(toSend.getCompoundTag("output"));
       FMLInterModComms.sendMessage("ThermalExpansion", "FurnaceRecipe", toSend);
   }
项目:PlayerInterfaceMod    文件:ThermalExpansionHelper.java   
public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {

        if (input == null || primaryOutput == null) {
            return;
        }
        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setTag("input", new NBTTagCompound());
        toSend.setTag("primaryOutput", new NBTTagCompound());

        if (secondaryOutput != null) {
            toSend.setTag("secondaryOutput", new NBTTagCompound());
        }

        input.writeToNBT(toSend.getCompoundTag("input"));
        primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));

        if (secondaryOutput != null) {
            secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
            toSend.setInteger("secondaryChance", secondaryChance);
        }

        FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", toSend);
    }
项目:PlayerInterfaceMod    文件:ThermalExpansionHelper.java   
public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {

        if (input == null || primaryOutput == null) {
            return;
        }
        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setTag("input", new NBTTagCompound());
        toSend.setTag("primaryOutput", new NBTTagCompound());

        if (secondaryOutput != null) {
            toSend.setTag("secondaryOutput", new NBTTagCompound());
        }

        input.writeToNBT(toSend.getCompoundTag("input"));
        primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));

        if (secondaryOutput != null) {
            secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
            toSend.setInteger("secondaryChance", secondaryChance);
        }

        FMLInterModComms.sendMessage("ThermalExpansion", "SawmillRecipe", toSend);
    }
项目:PlayerInterfaceMod    文件:ThermalExpansionHelper.java   
public static void addCrucibleRecipe(int energy, ItemStack input, FluidStack output) {

        if (input == null || output == null) {
            return;
        }
        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setTag("input", new NBTTagCompound());
        toSend.setTag("output", new NBTTagCompound());

        input.writeToNBT(toSend.getCompoundTag("input"));
        output.writeToNBT(toSend.getCompoundTag("output"));

        FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
    }
项目:PlayerInterfaceMod    文件:ThermalExpansionHelper.java   
public static void addTransposerFill(int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible) {

        if (input == null || output == null || fluid == null) {
            return;
        }
        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setTag("input", new NBTTagCompound());
        toSend.setTag("output", new NBTTagCompound());
        toSend.setTag("fluid", new NBTTagCompound());

        input.writeToNBT(toSend.getCompoundTag("input"));
        output.writeToNBT(toSend.getCompoundTag("output"));
        toSend.setBoolean("reversible", reversible);
        fluid.writeToNBT(toSend.getCompoundTag("fluid"));

        FMLInterModComms.sendMessage("ThermalExpansion", "TransposerFillRecipe", toSend);
    }
项目:PlayerInterfaceMod    文件:ThermalExpansionHelper.java   
public static void addTransposerExtract(int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible) {

        if (input == null || output == null || fluid == null) {
            return;
        }
        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setTag("input", new NBTTagCompound());
        toSend.setTag("output", new NBTTagCompound());
        toSend.setTag("fluid", new NBTTagCompound());

        input.writeToNBT(toSend.getCompoundTag("input"));
        output.writeToNBT(toSend.getCompoundTag("output"));
        toSend.setBoolean("reversible", reversible);
        toSend.setInteger("chance", chance);
        fluid.writeToNBT(toSend.getCompoundTag("fluid"));

        FMLInterModComms.sendMessage("ThermalExpansion", "TransposerExtractRecipe", toSend);
    }
项目:WIIEMC    文件:VersionChecker.java   
private void sendMessage() {
    if (Loader.isModLoaded("VersionChecker")) {
        String changeLog = "";
        for (String i : this.changeList)
            changeLog += "- " + i;

        NBTTagCompound tag = new NBTTagCompound();
        tag.setString("modDisplayName", this.modname);
        tag.setString("oldVersion", this.currentVer);
        tag.setString("newVersion", this.version);
        tag.setString("updateUrl", this.downloadURL);
        tag.setBoolean("isDirectLink", this.isDirect);
        tag.setString("changeLog", changeLog);
        FMLInterModComms.sendMessage("VersionChecker", "addUpdate", tag);
    }
    Logger.logInfo(String.format(translate("update.wiiemc"), this.version, this.downloadURL));
}
项目:WIIEMC    文件:Proxy.java   
public void init() {
    WIIEMC.config.initEvent();

    Logger.logInfo("Beware the flower pots...they will confuse you and ambush you...");
    if (Loader.isModLoaded("EE3")) {
        FMLInterModComms.sendMessage("Waila", "register", "net.lomeli.wiiemc.providers.ee3.BlockEMCDataProvider.callbackRegister");
        FMLInterModComms.sendMessage("Waila", "register", "net.lomeli.wiiemc.providers.ee3.EntityEMCDataProvider.callbackRegister");
        FMLInterModComms.sendMessage("Waila", "register", "net.lomeli.wiiemc.providers.ee3.TileEMCDataProvider.callbackRegister");
        MinecraftForge.EVENT_BUS.register(new EventHandler());
    }
    if (Loader.isModLoaded("ProjectE")) {
        FMLInterModComms.sendMessage("Waila", "register", "net.lomeli.wiiemc.providers.projecte.BlockEMCDataProvider.callbackRegister");
        FMLInterModComms.sendMessage("Waila", "register", "net.lomeli.wiiemc.providers.projecte.EntityEMCDataProvider.callbackRegister");
        FMLInterModComms.sendMessage("Waila", "register", "net.lomeli.wiiemc.providers.projecte.TileEMCDataProvider.callbackRegister");
    }
    if (Loader.isModLoaded("simplecondenser"))
        Logger.logInfo("Aww...I feel all special now...");

    if (Loader.isModLoaded("EE3") && Loader.isModLoaded("ProjectE"))
        Logger.logError("Greedy little fella, aren't ya?");
}
项目:AMCore    文件:AMCore.java   
@EventHandler
public void handleIMC(FMLInterModComms.IMCEvent event) {

    // IMCHandler
    try {
        log.info("Processing IMC messages...");
        IMCHandler.processIMC(event.getMessages());
        log.info("IMC Messages processed.");
    } catch (Exception e) {
        log.error("=============================ERROR!=============================");
        log.error("Failed to process IMC Messages, printing stacktrace...");
        log.error("Please report this as a bug report with the stacktrace, the minecraft log and a mod list + version to: " + issueURL);
        log.error("=============================ERROR!=============================");
        e.printStackTrace();
    }
}
项目:AMCore    文件:AMCore.java   
@EventHandler
public void loadComplete(FMLLoadCompleteEvent event) {

    // Fetching runtime messages
    try {
        log.info("Fetching runtime IMC messages...");
        IMCHandler.processIMC(FMLInterModComms.fetchRuntimeMessages(this));
        log.info("Fetched runtime IMC messages.");
    } catch (Exception e) {
        log.error("=============================ERROR!=============================");
        log.error("Failed to fetch IMC Runtime messages, printing stacktrace...");
        log.error("Please report this as a bug report with the stacktrace, the minecraft log and a mod list + version to: " + issueURL);
        log.error("=============================ERROR!=============================");
        e.printStackTrace();
    }
}
项目:R0b0ts    文件:ThermalExpansionHelper.java   
public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {

        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setCompoundTag("input", new NBTTagCompound());
        toSend.setCompoundTag("primaryOutput", new NBTTagCompound());
        toSend.setCompoundTag("secondaryOutput", new NBTTagCompound());

        input.writeToNBT(toSend.getCompoundTag("input"));
        primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));
        secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
        toSend.setInteger("secondaryChance", secondaryChance);

        FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", toSend);
    }
项目:Fluxed-Trinkets    文件:ThermalExpansionHelper.java   
public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {

        if (input == null || primaryOutput == null) {
            return;
        }
        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setTag("input", new NBTTagCompound());
        toSend.setTag("primaryOutput", new NBTTagCompound());

        if (secondaryOutput != null) {
            toSend.setTag("secondaryOutput", new NBTTagCompound());
        }

        input.writeToNBT(toSend.getCompoundTag("input"));
        primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));

        if (secondaryOutput != null) {
            secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
            toSend.setInteger("secondaryChance", secondaryChance);
        }

        FMLInterModComms.sendMessage("ThermalExpansion", "SawmillRecipe", toSend);
    }
项目:R0b0ts    文件:ThermalExpansionHelper.java   
public static void addTransposerExtract(int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible) {

        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setCompoundTag("input", new NBTTagCompound());
        toSend.setCompoundTag("output", new NBTTagCompound());
        toSend.setCompoundTag("fluid", new NBTTagCompound());

        input.writeToNBT(toSend.getCompoundTag("input"));
        output.writeToNBT(toSend.getCompoundTag("output"));
        toSend.setBoolean("reversible", reversible);
        toSend.setInteger("chance", chance);
        fluid.writeToNBT(toSend.getCompoundTag("fluid"));

        FMLInterModComms.sendMessage("ThermalExpansion", "TransposerExtractRecipe", toSend);
    }
项目:CartLivery    文件:ModCartLivery.java   
@Mod.EventHandler
public void handleIMCMessage(FMLInterModComms.IMCEvent event) {
    for (IMCMessage message : event.getMessages()) {
        if ("addClassExclusion".equals(message.key) && message.isStringMessage()) {
            try {
                Class<?> clazz = Class.forName(message.getStringValue());
                CommonProxy.excludedClasses.add(clazz);
            } catch (ClassNotFoundException e) {
                I18n.format("message.cartlivery.invalidExclusion", message.getSender(), message.getStringValue());
            }
        }
        if ("addBuiltInLiveries".equals(message.key) && message.isStringMessage() && FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) {
            String[] liveries = message.getStringValue().split(",");
            log.info(I18n.format("message.cartlivery.registerBuiltIn", liveries.length, message.getSender()));
            for(String livery : liveries) LiveryTextureRegistry.builtInLiveries.put(livery, message.getSender());
        }
    }
}
项目:PeripheralsPlusPlus    文件:ThermalExpansionHelper.java   
public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance) {

        if (input == null || primaryOutput == null) {
            return;
        }
        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setTag("input", new NBTTagCompound());
        toSend.setTag("primaryOutput", new NBTTagCompound());

        if (secondaryOutput != null) {
            toSend.setTag("secondaryOutput", new NBTTagCompound());
        }

        input.writeToNBT(toSend.getCompoundTag("input"));
        primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));

        if (secondaryOutput != null) {
            secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
            toSend.setInteger("secondaryChance", secondaryChance);
        }

        FMLInterModComms.sendMessage("ThermalExpansion", "PulverizerRecipe", toSend);
    }
项目:A-Cup-of-Java    文件:ThermalExpansionHelper.java   
public static void addTransposerExtract(int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible)
{

    if (input == null || output == null || fluid == null)
    {
        return;
    }
    NBTTagCompound toSend = new NBTTagCompound();

    toSend.setInteger("energy", energy);
    toSend.setTag("input", new NBTTagCompound());
    toSend.setTag("output", new NBTTagCompound());
    toSend.setTag("fluid", new NBTTagCompound());

    input.writeToNBT(toSend.getCompoundTag("input"));
    output.writeToNBT(toSend.getCompoundTag("output"));
    toSend.setBoolean("reversible", reversible);
    toSend.setInteger("chance", chance);
    fluid.writeToNBT(toSend.getCompoundTag("fluid"));

    FMLInterModComms.sendMessage("ThermalExpansion", "TransposerExtractRecipe", toSend);
}
项目:IceAndShadow2    文件:IceAndShadow2.java   
@EventHandler
public void init2(FMLInitializationEvent event) {
    NyxRecipes.init();

    if (IaSFlags.flag_death_system) {
        MinecraftForge.EVENT_BUS.register(new NyxDeathSystem());
    }

    NyxBiomes.registerBiomes();
    MinecraftForge.EVENT_BUS.register(new IaSTooltipHandler());
    MinecraftForge.EVENT_BUS.register(new NyxEventHandlerCold());
    MinecraftForge.EVENT_BUS.register(new NyxBlockHandler());
    MinecraftForge.EVENT_BUS.register(new NyxEquipmentHandler());
    GameRegistry.registerFuelHandler(new NyxFuelHandler());

    // Be nice, Thaumcraft.
    FMLInterModComms.sendMessage("Thaumcraft", "dimensionBlacklist", "" + IaSFlags.dim_nyx_id + ":0");
}
项目:PeripheralsPlusPlus    文件:ThermalExpansionHelper.java   
public static void addTransposerFill(int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible) {

        if (input == null || output == null || fluid == null) {
            return;
        }
        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setTag("input", new NBTTagCompound());
        toSend.setTag("output", new NBTTagCompound());
        toSend.setTag("fluid", new NBTTagCompound());

        input.writeToNBT(toSend.getCompoundTag("input"));
        output.writeToNBT(toSend.getCompoundTag("output"));
        toSend.setBoolean("reversible", reversible);
        fluid.writeToNBT(toSend.getCompoundTag("fluid"));

        FMLInterModComms.sendMessage("ThermalExpansion", "TransposerFillRecipe", toSend);
    }
项目:PeripheralsPlusPlus    文件:ThermalExpansionHelper.java   
public static void addTransposerExtract(int energy, ItemStack input, ItemStack output, FluidStack fluid, int chance, boolean reversible) {

        if (input == null || output == null || fluid == null) {
            return;
        }
        NBTTagCompound toSend = new NBTTagCompound();

        toSend.setInteger("energy", energy);
        toSend.setTag("input", new NBTTagCompound());
        toSend.setTag("output", new NBTTagCompound());
        toSend.setTag("fluid", new NBTTagCompound());

        input.writeToNBT(toSend.getCompoundTag("input"));
        output.writeToNBT(toSend.getCompoundTag("output"));
        toSend.setBoolean("reversible", reversible);
        toSend.setInteger("chance", chance);
        fluid.writeToNBT(toSend.getCompoundTag("fluid"));

        FMLInterModComms.sendMessage("ThermalExpansion", "TransposerExtractRecipe", toSend);
    }
项目:OresPlus    文件:MekanismHelper.java   
private void sendSimpleImcRecipe(String recipeKey, ItemStack input, Gas gasType, ItemStack output) {
    NBTTagCompound msg = new NBTTagCompound();

    NBTTagCompound nbtInput = new NBTTagCompound();
    input.writeToNBT(nbtInput);
    msg.setTag("input", nbtInput);

    if (gasType != null) {
        NBTTagCompound nbtGasType = new NBTTagCompound();
        gasType.write(nbtGasType);
        msg.setTag("gasType", nbtGasType);
    }

    NBTTagCompound nbtOutput = new NBTTagCompound();
    output.writeToNBT(nbtOutput);
    msg.setTag("output", nbtOutput);

    FMLInterModComms.sendMessage(this._modID, recipeKey, msg);
}
项目:R0b0ts    文件:ThermalExpansionHelper.java   
public static void addSmelterRecipe(int energy, ItemStack primaryInput, ItemStack secondaryInput, ItemStack primaryOutput, ItemStack secondaryOutput,
        int secondaryChance) {

    NBTTagCompound toSend = new NBTTagCompound();

    toSend.setInteger("energy", energy);
    toSend.setCompoundTag("primaryInput", new NBTTagCompound());
    toSend.setCompoundTag("secondaryInput", new NBTTagCompound());
    toSend.setCompoundTag("primaryOutput", new NBTTagCompound());
    toSend.setCompoundTag("secondaryOutput", new NBTTagCompound());

    primaryInput.writeToNBT(toSend.getCompoundTag("primaryInput"));
    secondaryInput.writeToNBT(toSend.getCompoundTag("secondaryInput"));
    primaryOutput.writeToNBT(toSend.getCompoundTag("primaryOutput"));
    secondaryOutput.writeToNBT(toSend.getCompoundTag("secondaryOutput"));
    toSend.setInteger("secondaryChance", secondaryChance);

    FMLInterModComms.sendMessage("ThermalExpansion", "SmelterRecipe", toSend);
}
项目:A-Cup-of-Java    文件:ThermalExpansionHelper.java   
public static void addTransposerFill(int energy, ItemStack input, ItemStack output, FluidStack fluid, boolean reversible)
{

    if (input == null || output == null || fluid == null)
    {
        return;
    }
    NBTTagCompound toSend = new NBTTagCompound();

    toSend.setInteger("energy", energy);
    toSend.setTag("input", new NBTTagCompound());
    toSend.setTag("output", new NBTTagCompound());
    toSend.setTag("fluid", new NBTTagCompound());

    input.writeToNBT(toSend.getCompoundTag("input"));
    output.writeToNBT(toSend.getCompoundTag("output"));
    toSend.setBoolean("reversible", reversible);
    fluid.writeToNBT(toSend.getCompoundTag("fluid"));

    FMLInterModComms.sendMessage("ThermalExpansion", "TransposerFillRecipe", toSend);
}
项目:Chisel-2    文件:Chisel.java   
@EventHandler
public void init(FMLInitializationEvent event) {
    Features.init();

    NetworkRegistry.INSTANCE.registerGuiHandler(this, new ChiselGuiHandler());

    addWorldgen(Features.MARBLE, ChiselBlocks.marble, Configurations.marbleAmount);
    addWorldgen(Features.LIMESTONE, ChiselBlocks.limestone, Configurations.limestoneAmount);
    addWorldgen(Features.ANDESITE, ChiselBlocks.andesite, Configurations.andesiteAmount, 40, 100, 0.5);
    addWorldgen(Features.GRANITE, ChiselBlocks.granite, Configurations.graniteAmount, 40, 100, 0.5);
    addWorldgen(Features.DIORITE, ChiselBlocks.diorite, Configurations.dioriteAmount, 40, 100, 0.5);
    GameRegistry.registerWorldGenerator(GeneratorChisel.INSTANCE, 1000);

       EntityRegistry.registerModEntity(EntityChiselSnowman.class, "snowman", 0, this, 80, 1, true);

    proxy.init();
    MinecraftForge.EVENT_BUS.register(this);
    FMLCommonHandler.instance().bus().register(instance);

    FMLInterModComms.sendMessage("Waila", "register", "com.cricketcraft.chisel.compat.WailaCompat.register");
}
项目:SecurityCraft    文件:SecurityCraft.java   
@EventHandler
public void init(FMLInitializationEvent event){
    log("Setting up inter-mod stuff...");

    FMLInterModComms.sendMessage("Waila", "register", "net.geforcemods.securitycraft.imc.waila.WailaDataProvider.callbackRegister");
    FMLInterModComms.sendMessage("LookingGlass", "API", "net.geforcemods.securitycraft.imc.lookingglass.LookingGlassAPIProvider.register");

    if(config.checkForUpdates) {
        NBTTagCompound vcUpdateTag = VersionUpdateChecker.getNBTTagCompound();
        if(vcUpdateTag != null)
            FMLInterModComms.sendRuntimeMessage(MODID, "VersionChecker", "addUpdate", vcUpdateTag);
    }

    log("Registering mod content... (PT 2/2)");
    NetworkRegistry.INSTANCE.registerGuiHandler(this, guiHandler);
    RegistrationHandler.registerEntities();
    EnumCustomModules.refresh();
    serverProxy.registerRenderThings();
}