本文整理匯總了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");
}
示例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());
}
示例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();
}
示例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();
}
示例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();
}
示例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: 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);
}
示例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();
}
示例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");
}
示例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);
}
}
示例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();
}
}
示例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;
}
示例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);
}
示例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", "");
}
示例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);
}
}