本文整理匯總了Java中net.minecraftforge.fml.common.event.FMLInterModComms.sendMessage方法的典型用法代碼示例。如果您正苦於以下問題:Java FMLInterModComms.sendMessage方法的具體用法?Java FMLInterModComms.sendMessage怎麽用?Java FMLInterModComms.sendMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraftforge.fml.common.event.FMLInterModComms
的用法示例。
在下文中一共展示了FMLInterModComms.sendMessage方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onInit
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@Mod.EventHandler
public void onInit(FMLInitializationEvent ev) {
info("Randores is Initializing...",
"Sending handler message to WAILA.");
FMLInterModComms.sendMessage("waila", "register", "com.gmail.socraticphoenix.randores.waila.RandoresWailaHandler.callbackRegister");
if (Loader.isModLoaded("waila")) {
info("WAILA was found and should have receieved the handler message.");
} else {
info("WAILA wasn't found. The handler message will be ignored.");
}
info("Registering up GUI handler and world generators...");
NetworkRegistry.INSTANCE.registerGuiHandler(this, new RandoresGuiHandler());
GameRegistry.registerWorldGenerator(new RandoresWorldGenerator(), 10);
GameRegistry.registerWorldGenerator(new RandoresAltarGenerator(), -100);
info("Registered GUI hander and world generators.", "Calling proxy Initialization...");
Randores.PROXY.initSided(ev);
info("Finished Initialization.");
}
示例2: init
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@EventHandler
public static void init(FMLInitializationEvent event) {
OreRegistry.loadJson(new File(configDirectory, "OreRegistry.json"));
loadConfigs();
Recipes.init();
OreRegistry.doRecipes();
proxy.initOreModels();
proxy.registerColorHandlers();
FMLInterModComms.sendMessage("Waila", "register",
"exnihiloadscensio.compatibility.CompatWaila.callbackRegister");
if (Loader.isModLoaded("theoneprobe") && Config.doTOPCompat) {
CompatTOP.init();
}
}
示例3: init
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@Override
public void init(FMLInitializationEvent event) {
/* rollingmachine_recipes = RailcraftCraftingManager.rollingMachine.getRecipeList();
crusher_recipes = RailcraftCraftingManager.rockCrusher.getRecipes();
coke_oven = RailcraftCraftingManager.cokeOven.getRecipes();
blast_furnace = RailcraftCraftingManager.blastFurnace.getRecipes(); */
FMLInterModComms.sendMessage(DocumentationModule.modid, "AddRecipeCategory", "tile.railcraft.machine.alpha.rolling.machine.name|factorization.compat.railcraft.Compat_Railcraft|rollingmachine_recipes");
//FMLInterModComms.sendMessage(DocumentationModule.modid, "AddRecipeCategory", "tile.railcraft.machine.alpha.rock.crusher.name|factorization.compat.railcraft.Compat_Railcraft|crusher_recipes");
FMLInterModComms.sendMessage(DocumentationModule.modid, "AddRecipeCategory", "railcraft.gui.coke.oven|factorization.compat.railcraft.Compat_Railcraft|coke_oven");
FMLInterModComms.sendMessage(DocumentationModule.modid, "AddRecipeCategory", "railcraft.gui.blast.furnace|factorization.compat.railcraft.Compat_Railcraft|blast_furnace");
NBTTagCompound tag = new NBTTagCompound();
tag.setString("category", "tile.railcraft.machine.alpha.rock.crusher.name|factorization.compat.railcraft.Compat_Railcraft|crusher_recipes");
tag.setTag("input", list("getInput()"));
tag.setTag("output", list("getPossibleOuputs()"));
FMLInterModComms.sendMessage(DocumentationModule.modid, "AddRecipeCategoryGuided", tag);
}
示例4: registerCraftingTweaks
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
/**
*
* https://minecraft.curseforge.com/projects/crafting-tweaks https://github.com/blay09/CraftingTweaks/blob/1.12/README.md
*/
private static void registerCraftingTweaks() {
//first the players inventory
NBTTagCompound tagCompound = new NBTTagCompound();
tagCompound.setString("ContainerClass", ContainerPlayerExtWorkbench.class.getName());
tagCompound.setInteger("GridSlotNumber", 6);
// tagCompound.setInteger("GridSize", 9);
FMLInterModComms.sendMessage("craftingtweaks", "RegisterProvider", tagCompound);
//then the grey workbench
tagCompound = new NBTTagCompound();
tagCompound.setString("ContainerClass", ContainerWorkBench.class.getName());
tagCompound.setInteger("GridSlotNumber", 1);
FMLInterModComms.sendMessage("craftingtweaks", "RegisterProvider", tagCompound);
//then the purple autocrafter
tagCompound = new NBTTagCompound();
tagCompound.setString("ContainerClass", ContainerCrafter.class.getName());
tagCompound.setInteger("GridSlotNumber", 10);
FMLInterModComms.sendMessage("craftingtweaks", "RegisterProvider", tagCompound);
}
示例5: preInit
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
creativeBlockPlacer = new ItemCreativeBlockPlacer();
GameRegistry.register(creativeBlockPlacer, blockPlacerResourceLocation);
proxy.preInit(event);
Config.preInit(event);
sourceFile = event.getSourceFile();
MinecraftForge.EVENT_BUS.register(this);
JSONConfigHandler.setup(event.getModConfigurationDirectory());
CreativeBlocksRegistry.init();
NetworkHandler.init();
FMLInterModComms.sendMessage("Waila", "register", "squeek.creativeblocks.integration.waila.WailaRegistrar.register");
FMLInterModComms.sendMessage("VersionChecker", "addVersionCheck", "http://www.ryanliptak.com/minecraft/versionchecker/squeek502/CreativeBlocks");
}
示例6: init
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@EventHandler
public void init(FMLInitializationEvent event){
log("Setting up inter-mod stuff...");
FMLInterModComms.sendMessage("Waila", "register", "net.geforcemods.securitycraft.imc.waila.WailaDataProvider.callbackRegister");
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();
}
示例7: init
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@EventHandler
public void init(FMLInitializationEvent event){
log("Setting up inter-mod stuff...");
FMLInterModComms.sendMessage("waila", "register", "net.geforcemods.securitycraft.imc.waila.WailaDataProvider.callbackRegister");
if(config.checkForUpdates) {
NBTTagCompound vcUpdateTag = VersionUpdateChecker.getNBTTagCompound();
if(vcUpdateTag != null)
FMLInterModComms.sendRuntimeMessage(MODID, "VersionChecker", "addUpdate", vcUpdateTag);
}
log("Regisering mod content... (PT 2/2)");
NetworkRegistry.INSTANCE.registerGuiHandler(this, guiHandler);
RegistrationHandler.registerEntities();
EnumCustomModules.refresh();
serverProxy.registerRenderThings();
}
示例8: init
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@EventHandler
public void init(FMLInitializationEvent event){
log("Setting up inter-mod stuff...");
FMLInterModComms.sendMessage("Waila", "register", "net.geforcemods.securitycraft.imc.waila.WailaDataProvider.callbackRegister");
if(config.checkForUpdates) {
NBTTagCompound vcUpdateTag = VersionUpdateChecker.getNBTTagCompound();
if(vcUpdateTag != null)
FMLInterModComms.sendRuntimeMessage(MODID, "VersionChecker", "addUpdate", vcUpdateTag);
}
log("Registering mod content... (PT 2/2)");
SecurityCraft.serverProxy.registerResourceLocations();
NetworkRegistry.INSTANCE.registerGuiHandler(this, guiHandler);
RegistrationHandler.registerEntities();
EnumCustomModules.refresh();
serverProxy.registerRenderThings();
}
示例9: init
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@EventHandler
public void init(FMLInitializationEvent event){
log("Setting up inter-mod stuff...");
FMLInterModComms.sendMessage("waila", "register", "net.geforcemods.securitycraft.imc.waila.WailaDataProvider.callbackRegister");
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();
}
示例10: handleIMC
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@EventHandler
public void handleIMC(IMCEvent evt) {
NBTTagCompound extensions = new NBTTagCompound();
NBTTagList data = new NBTTagList();
for (Map.Entry<String, String> e : KNOWN_MIME_TYPES.entrySet()) {
NBTTagCompound entry = new NBTTagCompound();
entry.setString("mime", e.getKey());
entry.setString("ext", e.getValue());
data.appendTag(entry);
}
extensions.setTag("data", data);
for (IMCMessage msg : evt.getMessages())
if ("listCodecs".equalsIgnoreCase(msg.key)) {
String sender = msg.getSender();
Log.info("Received codec list request from %s, responding", sender);
FMLInterModComms.sendMessage(sender, "knownCodecs", extensions);
}
}
示例11: register
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
public static void register(){
if (registered)
return;
registered = true;
String mcVersion = Loader.instance().getMinecraftModContainer().getVersion();
MobBlocker.logger.info(mcVersion);
if (mcVersion.equals("1.10.2")) {
FMLInterModComms.sendMessage("Waila", "register", "maxwell_lt.mobblocker.integration.WailaCompatibility.load");
MobBlocker.logger.info("Sent IMC");
} else FMLInterModComms.sendMessage("waila", "register", "maxwell_lt.mobblocker.integration.WailaCompatibility.load");
}
示例12: preInit
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
public static void preInit() {
//Add soulforged steel as a liquid
if (Loader.isModLoaded("betterwithmods")) {
Fluid soulforgedSteel = new Fluid("soulforged_steel", new ResourceLocation("tconstruct:blocks/fluids/molten_metal"), new ResourceLocation("tconstruct:blocks/fluids/molten_metal_flow"));
FluidRegistry.registerFluid(soulforgedSteel);
FluidRegistry.addBucketForFluid(soulforgedSteel);
NBTTagCompound tag = new NBTTagCompound();
tag.setString("fluid", soulforgedSteel.getName());
tag.setString("ore", "SoulforgedSteel");
tag.setBoolean("toolforge", false);
FMLInterModComms.sendMessage("tconstruct", "integrateSmeltery", tag);
}
}
示例13: callEnderio
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
private static void callEnderio(Fluid fluid, int burnTime) {
NBTTagCompound tag = new NBTTagCompound();
tag.setString(EIOConstants.KEY_FLUID_NAME, fluid.getName());
tag.setInteger(EIOConstants.KEY_TOTAL_BURN_TIME, Config.getEIOBurnTime(fluid.getName(), burnTime * 5));
tag.setInteger(EIOConstants.KEY_POWER_PER_CYCLE, Config.getEIOPowerPerCycle(fluid.getName(), burnTime * 2 / 10));
FMLInterModComms.sendMessage(Configs.EIO, EIOConstants.FLUID_FUEL_ADD, tag);
}
示例14: setCustomColorForItemStack
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
/** Call this method to override the default color of the specified ItemStack. NOTE: only use
* this for items you can't get access to (i.e, vanilla items). Otherwise, use IOverrideEBColor! */
public static void setCustomColorForItemStack(ItemStack stack, int colorOverride) {
NBTTagCompound tag = new NBTTagCompound();
stack.writeToNBT(tag);
tag.setInteger("colorOverride", colorOverride);
FMLInterModComms.sendMessage("EverythingBlocks", "stackColorOverride", tag);
}
示例15: onInit
import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
/**
* Triggers the onInit method in all registered addons.
*/
public static void onInit () {
if (Loader.isModLoaded("Waila")) {
FMLInterModComms.sendMessage("Waila", "register", "net.darkhax.darkutils.addons.waila.DarkUtilsTileProvider.registerAddon");
}
for (final ModAddon addon : addonRegistry) {
addon.onInit();
}
}