本文整理汇总了Java中cpw.mods.fml.common.event.FMLInterModComms.sendRuntimeMessage方法的典型用法代码示例。如果您正苦于以下问题:Java FMLInterModComms.sendRuntimeMessage方法的具体用法?Java FMLInterModComms.sendRuntimeMessage怎么用?Java FMLInterModComms.sendRuntimeMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cpw.mods.fml.common.event.FMLInterModComms
的用法示例。
在下文中一共展示了FMLInterModComms.sendRuntimeMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: register
import cpw.mods.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(ModpackInfo.MOD_ID,
"VersionChecker", "addVersionCheck", nbt);
}
if (ModOptions.getOnlineVersionChecking()) {
final VersionCheck test = new VersionCheck();
FMLCommonHandler.instance().bus().register(test);
new Thread(test).start();
}
}
示例2: init
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
@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();
}
示例3: init
import cpw.mods.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");
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();
}
示例4: integrateWithVersionChecker
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
/**
* Integrates with version checker
*/
private static void integrateWithVersionChecker()
{
// Create the tag
NBTTagCompound tag = new NBTTagCompound();
// Set the project name
tag.setString( "curseProjectName", "223666-thaumic-energistics" );
// Set the file name
tag.setString( "curseFilenameParser", "thaumicenergistics-[].jar" );
// Set the mod name
tag.setString( "modDisplayName", "Thaumic Energistics" );
// Send to version checker
FMLInterModComms.sendRuntimeMessage( ThaumicEnergistics.MOD_ID, "VersionChecker", "addCurseCheck", tag );
}
示例5: register
import cpw.mods.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(Pathways.MOD_ID, "VersionChecker", "addVersionCheck", nbt);
}
if (ModOptions.getOnlineVersionChecking()) {
final VersionCheck test = new VersionCheck();
FMLCommonHandler.instance().bus().register(test);
new Thread(test).start();
}
}
示例6: register
import cpw.mods.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(ThermalRecycling.MOD_ID, "VersionChecker", "addVersionCheck", nbt);
}
if (ModOptions.getOnlineVersionChecking()) {
final VersionCheck test = new VersionCheck();
FMLCommonHandler.instance().bus().register(test);
new Thread(test).start();
}
}
示例7: init
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
@Override
@EventHandler
public void init(FMLInitializationEvent event) {
FMLInterModComms.sendRuntimeMessage(MODID, "VersionChecker", "addVersionCheck", UPDATE_URL);
config.init(event);
proxy.init(event);
recipes.init(event);
network.init(event);
}
示例8: init
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
@EventHandler
public static void init(FMLInitializationEvent event)
{
ModLogger.print(ModLogger.INFO, "Loading Custom Oven recipes...");
// Loading Custom Oven recipes
OvenRecipes.load();
// Registering the Lettuce world generator
GameRegistry.registerWorldGenerator(new WorldGenWildPlants(), 1);
/**
* RECIPES
*/
RecipeRegistry.registerRecipes();
FMLInterModComms.sendMessage("Waila", "register", "dk.mrspring.kitchen.comp.waila.WailaDataProvider.callbackRegister");
FMLInterModComms.sendRuntimeMessage(ModInfo.modid, "VersionChecker", "addVersionCheck", "http://www.mrspring.dk/mods/kitchen/vchecker.json");
FMLInterModComms.sendMessage("cfm", "register", "dk.mrspring.kitchen.comp.furniture.CrayfishFurnitureRegister.registerRecipes");
MinecraftForge.EVENT_BUS.register(new SandwichableTooltipEvent());
Jam.registerJam(new Jam("strawberry", 16196364, "kitchen:strawberry_jam"));
Jam.registerJam(new Jam("apple", 14415786, "kitchen:apple_jam"));
Jam.registerJam(new Jam("peanut", 9659689, "kitchen:peanut_jam"));
Ingredient.registerIngredient(new Ingredient("strawberry", "jam.strawberry.name", "strawberry"));
Ingredient.registerIngredient(new Ingredient("apple", "jam.apple.name", "apple"));
Ingredient.registerIngredient(new Ingredient("peanut", "jam.peanut.name", "peanut"));
Ingredient.registerIngredient(new Ingredient("bacon", "ingredient.bacon.name", new ItemStack(KitchenItems.bacon, 1)));
Ingredient.registerIngredient(new Ingredient("chicken_fillet", "ingredient.chicken_fillet.name", KitchenItems.chicken_fillet));
KitchenItems.linkToIngredient(KitchenItems.jammable_strawberry, "strawberry");
KitchenItems.linkToIngredient(KitchenItems.cut_apple, "apple");
KitchenItems.linkToIngredient(KitchenItems.raw_bacon, "bacon");
KitchenItems.linkToIngredient(KitchenItems.peanut, "peanut");
KitchenItems.linkToIngredient(KitchenItems.raw_chicken_fillet, "chicken_fillet");
}
示例9: initVersionChecker
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public void initVersionChecker()
{
if (Loader.isModLoaded("UniversalCore"))
UCVersionChecker.registerModVersion(new UCVersion(Reference.MOD_VERSION, "https://raw.githubusercontent.com/UniversalTeam/UCModVersions/master/FlatBedrock/version.json"));
else
{
NBTTagCompound compound = new NBTTagCompound();
compound.setString("curseProjectName", "78886-flatbedrockx");
compound.setString("curseFilenameParser", "FlatBedrockx-[].jar");
FMLInterModComms.sendRuntimeMessage(Reference.MOD_ID, "VersionChecke", "addCurseCheck", compound);
}
}
示例10: sendTestMessage
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
protected void sendTestMessage()
{
NBTTagCompound compound = new NBTTagCompound();
compound.setString("fileName", "testDimension");
compound.setInteger("dimensionID", 555);
compound.setBoolean("generateFlatTop", true);
compound.setBoolean("generateFlatBottom", false);
compound.setString("fillBlock", "minecraft:end_stone");
FMLInterModComms.sendRuntimeMessage(Reference.MOD_ID, Reference.MOD_ID, "addDimension", compound);
}
示例11: addVersionChecker
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public void addVersionChecker() {
NBTTagCompound tag = new NBTTagCompound();
tag.setString("curseProjectName", "228312-adventure-backport");
tag.setString("curseFilenameParser", "adventure_backport-[].jar");
FMLInterModComms.sendRuntimeMessage(Reference.MODID, "VersionChecker", "addCurseCheck", tag);
}
示例12: init
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
public static void init(){
FMLInterModComms.sendRuntimeMessage(Reference.MOD_ID, "VersionChecker", "addVersionCheck", "https://raw.githubusercontent.com/goldenapple3/RFDrills/master/version.json");
}
示例13: run
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
@Override
public void run() {
try {
// This is our current locally used version.
ModVersion ourVersion = ModVersion.parse(mod.getModName(), MinecraftForge.MC_VERSION + "-" + mod.getModVersion());
// Fetch the new version from the internet.
URL versionFile = new URL(releaseUrl);
BufferedReader reader = new BufferedReader(new InputStreamReader(versionFile.openStream()));
newModVersion = ModVersion.parse(mod.getModName(), reader.readLine());
ModVersion criticalVersion = ModVersion.parse(mod.getModName(), reader.readLine());
reader.close();
isNewVersionAvailable = ourVersion.compareTo(newModVersion) < 0;
if (isNewVersionAvailable) {
Electrometrics.getLogger().info("An updated version of " + mod.getModName() + " is available: " + newModVersion + ".");
if (ourVersion.getMinecraftVersion().compareTo(newModVersion.getMinecraftVersion()) < 0) {
ReleaseVersion newReleaseVersion = newModVersion.getMinecraftVersion();
ReleaseVersion ourReleaseVersion = ourVersion.getMinecraftVersion();
isNewVersionAvailable = newReleaseVersion.getMajor() == ourReleaseVersion.getMajor() && newReleaseVersion.getMinor() == ourReleaseVersion.getMinor();
}
if (criticalVersion != null && ourVersion.compareTo(criticalVersion) >= 0) {
isCriticalUpdate = Boolean.parseBoolean(criticalVersion.getDescription());
isCriticalUpdate &= isNewVersionAvailable;
}
}
if (isCriticalUpdate) {
Electrometrics.getLogger().info("This update has been marked as CRITICAL and will ignore notification suppression.");
}
// VersionChecker integration.
if (Integration.isVersionCheckerEnabled) {
NBTTagCompound nbtTagCompound = new NBTTagCompound();
nbtTagCompound.setString("modDisplayName", mod.getModName());
nbtTagCompound.setString("oldVersion", ourVersion.toString());
nbtTagCompound.setString("newVersion", newModVersion.toString());
if (downloadUrl != null) {
nbtTagCompound.setString("updateUrl", downloadUrl);
nbtTagCompound.setBoolean("isDirectLink", false);
}
FMLInterModComms.sendRuntimeMessage(mod.getModId(), "VersionChecker", "addUpdate", nbtTagCompound);
isNewVersionAvailable &= isCriticalUpdate;
}
} catch (Exception e) {
Electrometrics.getLogger().log(Level.WARN, AbstractLogger.CATCHING_MARKER, "Update check for " + mod.getModName() + " failed.", e);
}
isCheckCompleted = true;
}
示例14: postInit
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
@EventHandler
public void postInit(FMLPostInitializationEvent event)
{
FMLInterModComms.sendRuntimeMessage(ModInfo.MODID, "VersionChecker", "addVersionCheck", "http://www.ryanliptak.com/minecraft/versionchecker/squeek502/HungerInPeace");
}
示例15: init
import cpw.mods.fml.common.event.FMLInterModComms; //导入方法依赖的package包/类
@EventHandler
public void init(FMLInitializationEvent event) {
//Show a message when the Sugar+ Mod is in the 'init' phase and if debug messages are enabled
if(this.enableDebugMessages) {
LogHelper.info(String.format("Register tile entities, GuiHandler, recipes, achievements and initialize proxy, VersionChecker integration! (Init phase)"));
}
//Register the tile entities
GameRegistry.registerTileEntity(TileEntityCaramelFurnace.class, "TileEntityCaramelFurnace");
GameRegistry.registerTileEntity(TileEntityFlatSugar.class, "TileEntityFlatSugar");
//Register the GuiHandler
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
//Register the rendering things
sugarplusProxy.initRendering();
//Register the custom enum rarity types
sugarplusProxy.addGranulationEnumRarityTypes();
//Load the crafting recipes
SugarplusRecipes.init();
//Load the crafting recipe remover
SugarplusRecipeRemover.removeCraftingRecipes();
//Load the achievements
cookbookAchievement = new Achievement("achievement.cookbookAchievement", "cookbookAchievement", 0, 0, cookbook, (Achievement)null).registerStat();
cookbook2Achievement = new Achievement("achievement.cookbook2Achievement", "cookbook2Achievement", 1, 3, cookbook2, (Achievement)null).registerStat();
//Register the achievement page
AchievementPage.registerAchievementPage(new AchievementPage(StatCollector.translateToLocal("achievement_page.sugarplus"), new Achievement[] {cookbookAchievement, cookbook2Achievement}));
//Initialize Version Checker integration
FMLInterModComms.sendRuntimeMessage(Sugarplus.MOD_ID, "VersionChecker", "addVersionCheck", "https://raw.githubusercontent.com/ErrorCraftLP/Minecraft-Sugarplus-Mod/master/version.json");
}