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


Java FMLInterModComms.sendRuntimeMessage方法代碼示例

本文整理匯總了Java中net.minecraftforge.fml.common.event.FMLInterModComms.sendRuntimeMessage方法的典型用法代碼示例。如果您正苦於以下問題:Java FMLInterModComms.sendRuntimeMessage方法的具體用法?Java FMLInterModComms.sendRuntimeMessage怎麽用?Java FMLInterModComms.sendRuntimeMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraftforge.fml.common.event.FMLInterModComms的用法示例。


在下文中一共展示了FMLInterModComms.sendRuntimeMessage方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: init

import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{		
	FMLInterModComms.sendRuntimeMessage(MODID, "VersionChecker", "addVersionCheck", VERSION_LINK);
	
	instance = this;		
	proxy.init();
       
       EventHandler eventHandler = new EventHandler();
       MinecraftForge.EVENT_BUS.register(eventHandler);
	
       if(FMLCommonHandler.instance().getEffectiveSide().isClient())
           FMLCommonHandler.instance().bus().register(eventHandler);
       
       //Minecraft.getMinecraft().gameSettings.showInventoryAchievementHint = false;
       Minecraft.getMinecraft().gameSettings.saveOptions();
       
       //Stop space from activating buttons, allowing it to be used for adding keyframes in the timeline.
       InputMap im = (InputMap)UIManager.get("Button.focusInputMap");
       im.put(KeyStroke.getKeyStroke("pressed SPACE"), "none");
       im.put(KeyStroke.getKeyStroke("released SPACE"), "none");
}
 
開發者ID:ObsidianSuite,項目名稱:ObsidianSuite,代碼行數:23,代碼來源:ObsidianAnimator.java

示例2: postInit

import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@Override
public void postInit() {
	if (Loader.isModLoaded("VersionChecker")) {
		FMLInterModComms.sendRuntimeMessage(Reference.MOD_ID, "VersionChecker", "addVersionCheck", Reference.VersionURL);
	} else {
		VersionCheck versionCheck = new VersionCheck();
		Thread versionCheckThread = new Thread(versionCheck, "Version Check");
		versionCheckThread.start();
	}
	if (Loader.isModLoaded("CarpentersBlocks")) {
		MwChunk.carpenterdata();
	}
	if (Loader.isModLoaded("ForgeMultipart")) {
		MwChunk.FMPdata();

	}
	MwAPI.registerDataProvider("Slime", new OverlaySlime());
	MwAPI.registerDataProvider("Grid", new OverlayGrid());
}
 
開發者ID:tom5454,項目名稱:Toms-Mod,代碼行數:20,代碼來源:ClientProxy.java

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

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

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

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

示例7: load

import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@Mod.EventHandler
public void load(FMLInitializationEvent event) {
	proxy.init();
	ZSSItems.init();
	MinecraftForge.EVENT_BUS.register(instance);
	MinecraftForge.EVENT_BUS.register(new ZSSCombatEvents());
	MinecraftForge.EVENT_BUS.register(new ZSSEntityEvents());
	MinecraftForge.EVENT_BUS.register(new ZSSItemEvents());
	NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
	MinecraftForge.EVENT_BUS.register(new ZSSWorldGenEvent());
	if (Config.areBossDungeonsEnabled()) {
		ZSSBossDungeonGen dungeonGen = new ZSSBossDungeonGen();
		MinecraftForge.EVENT_BUS.register(dungeonGen);
		MinecraftForge.TERRAIN_GEN_BUS.register(dungeonGen);
	}
	if (Config.getGossipStoneRate() > 0) {
		MinecraftForge.EVENT_BUS.register(WorldGenGossipStones.INSTANCE);
	}
	MinecraftForge.EVENT_BUS.register(WorldGenJars.INSTANCE);
	FMLInterModComms.sendRuntimeMessage(ModInfo.ID, "VersionChecker", "addVersionCheck", ModInfo.VERSION_LIST);
}
 
開發者ID:coolAlias,項目名稱:ZeldaSwordSkills,代碼行數:22,代碼來源:ZSSMain.java

示例8: preInit

import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
    MinecraftForge.EVENT_BUS.register(new EventHandler());

    FMLCommonHandler.instance().bus().register(new ConfigHandler());

    ConfigHandler.init(event);

    RemoveHandler.init();

    FMLInterModComms.sendRuntimeMessage(Reference.MOD_ID, "VersionChecker", "addVersionCheck", REMOTE_VERSION_URL);

    if (!disableNEMCheck)
        NEMChecker.execute();

    /*
    NBTTagCompound compound = new NBTTagCompound();
    compound.setString("curseProjectName", "221140-version-checker");
    compound.setString("curseFilenameParser", "VersionChecker-[].jar");

    FMLInterModComms.sendRuntimeMessage(Reference.MOD_ID, "VersionChecker", "addCurseCheck", compound);
    */

    //sendABunchOfDerpyMessages();
}
 
開發者ID:Dynious,項目名稱:VersionChecker,代碼行數:27,代碼來源:VersionChecker.java

示例9: postInit

import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent evt) {
    final Minecraft mc = Minecraft.getMinecraft();

    GLCore.setFont(mc, OptionCore.CUSTOM_FONT.getValue());
    FMLInterModComms.sendRuntimeMessage(SAOCore.MODID, "VersionChecker", "addVersionCheck", "https://gitlab.com/saomc/PublicVersions/raw/master/saoui1.8ver.json");
}
 
開發者ID:Tencao,項目名稱:SAO-UI---1.8.8,代碼行數:9,代碼來源:SAOCore.java

示例10: sendIMC

import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
public void sendIMC() {
    //Registers our recipe handlers to a list in NEIPlugins.
    //Format: "[email protected]<Recipe Name>@<outputId that used to view all recipes>"
    for (String msg : new String[] {
            "factorization crystallizer [email protected]",
            //"factorization grinder [email protected]",
            "factorization mixer [email protected]",
            "factorization slag furnace [email protected]"
    }) {
        FMLInterModComms.sendRuntimeMessage(Core.instance, "NEIPlugins", "register-crafting-handler", Core.name + "@" + msg);
    }
}
 
開發者ID:purpleposeidon,項目名稱:Factorization,代碼行數:13,代碼來源:Registry.java

示例11: register

import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
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(Restructured.MOD_ID, "VersionChecker", "addVersionCheck", nbt);
		}

		if (ModOptions.getOnlineVersionChecking()) {
			final VersionCheck test = new VersionCheck();
			MinecraftForge.EVENT_BUS.register(test);
			new Thread(test).start();
		}
	}
 
開發者ID:OreCruncher,項目名稱:Restructured,代碼行數:16,代碼來源:VersionCheck.java

示例12: sendReply

import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
protected boolean sendReply(FMLInterModComms.IMCMessage message, String value)
{
    if (message.getSender() == null)
    {
        return false;
    }

    NBTTagCompound cmp = message.getNBTValue();
    FMLInterModComms.sendRuntimeMessage(modOwnerID, message.getSender(), cmp.getString("replyKey"), value);
    return true;
}
 
開發者ID:Ivorforce,項目名稱:IvToolkit,代碼行數:12,代碼來源:IvFMLIntercommHandler.java

示例13: sendJarLidMaterial

import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
static void sendJarLidMaterial(ItemStack itemstack, int uses, int jartype) {
	NBTTagCompound nbt = new NBTTagCompound();
	nbt.setTag("liditemstack", itemstack.writeToNBT(new NBTTagCompound()));
	nbt.setInteger("uses", uses);
	nbt.setInteger("jartype", jartype);
	nbt.setBoolean("checknbt", true);
	
	FMLInterModComms.sendRuntimeMessage(VintageCraft.instance, "butterflymania", "butterflymania-regjarlidmaterial", nbt);
}
 
開發者ID:tyronx,項目名稱:vintagecraft,代碼行數:10,代碼來源:Recipes.java

示例14: postInit

import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
@EventHandler
public void postInit(FMLPostInitializationEvent event) { 
	proxy.postInit(event);
	
	ItemsVC.initTabIcons();
	DynTreeGenerators.initGenerators();
	
	Recipes.addRecipes();
	EnumAnvilRecipe.registerRecipes();
	EnumCarpentryRecipes.registerRecipes();
	
	FMLInterModComms.sendRuntimeMessage(VintageCraft.instance, "butterflymania", "butterflymania-disabledefaultspawn", "");
}
 
開發者ID:tyronx,項目名稱:vintagecraft,代碼行數:14,代碼來源:VintageCraft.java

示例15: tryNotifyDynious

import net.minecraftforge.fml.common.event.FMLInterModComms; //導入方法依賴的package包/類
private void tryNotifyDynious(){
	if(isHigherVersion()){
		NBTTagCompound update = new NBTTagCompound();
		update.setString("modDisplayName", HostMODNAME);
		update.setString("oldVersion", HostVERSION);
		update.setString("newVersion", latest);
		update.setString("updateURL", getDownloadUrl());
		update.setBoolean("isDirectLink", false);
		FMLInterModComms.sendRuntimeMessage(HostMODID, "VersionChecker", "addUpdate", update);
	}
}
 
開發者ID:therealfarfetchd,項目名稱:IngameAccountSwitcher,代碼行數:12,代碼來源:VersionChecker.java


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