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


Java FMLPreInitializationEvent.getModLog方法代碼示例

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


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

示例1: onPreInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@Mod.EventHandler
public void onPreInit(FMLPreInitializationEvent event)
{
    try
    {
        instance = this;
        this.logger = event.getModLog();
        this.conf = new File(Launch.minecraftHome, "authlibloginhelper-accounts.json");
        if (this.conf.createNewFile())
        {
            String path = this.conf.getAbsolutePath();
            this.logger.info("AuthlibLoginHelper: Successfully created " + path);
        }
        MinecraftForge.EVENT_BUS.register(this);
    }
    catch (IOException e)
    {
        throw Throwables.propagate(e);
    }
}
 
開發者ID:ustc-zzzz,項目名稱:AuthlibLoginHelper,代碼行數:21,代碼來源:AuthlibLoginHelper.java

示例2: preInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
    logger = event.getModLog();

    config = new Configuration(event.getSuggestedConfigurationFile());
    doConfig();

    int id = 1; // Don't use 0, more easy debug.
    snw = NetworkRegistry.INSTANCE.newSimpleChannel(MOD_ID);

    snw.registerMessage(Request.Handler.class, Request.class, id++, Side.SERVER);
    snw.registerMessage(Data.Handler.class, Data.class, id++, Side.CLIENT);

    proxy.preInit();
}
 
開發者ID:dries007,項目名稱:DebugServerInfo,代碼行數:17,代碼來源:DebugServerInfo.java

示例3: preInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@EventHandler
  public void preInit(FMLPreInitializationEvent event){
  	Util.logger = new Logger(event.getModLog());

  	// find the fields we need regardless of obs
  	OpenGuiWrapper.findFields();

  	// register event handlers
  	MinecraftForge.EVENT_BUS.register(new Registrar());
  	MinecraftForge.EVENT_BUS.register(new VersionTracker());
  	MinecraftForge.EVENT_BUS.register(PlayerWorldSyncServer.INSTANCE);

// setup networking
  	RemoteGuiNetworkManager.INSTANCE.preInit(event);

  	VersionTracker.register(new UniversalRemoteVersionProvider());

  	proxy.preInit(event);

  	// fix broken config issues
  	UniversalRemoteConfiguration.validateConfig();
  }
 
開發者ID:orbwoi,項目名稱:UniversalRemote,代碼行數:23,代碼來源:UniversalRemote.java

示例4: preInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
    event.getModMetadata().version = VERSION;
    log = event.getModLog();
    devEnvChache = (Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
    isMekanismLoaded = Loader.isModLoaded("mekanism");

    NET_CHANNEL.registerMessage(PktCopyToClipboard.class, PktCopyToClipboard.class, 0, Side.CLIENT);
    NET_CHANNEL.registerMessage(PktSyncSelection.class, PktSyncSelection.class, 1, Side.CLIENT);

    proxy.loadModData(event.getModConfigurationDirectory());

    proxy.preInit();
}
 
開發者ID:HellFirePvP,項目名稱:ModularMachinery,代碼行數:15,代碼來源:ModularMachinery.java

示例5: preInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
/**
 * Run before anything else. Read your config, create blocks, items, etc, and
 * register them with the GameRegistry.
 */
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent e) {
    logger = e.getModLog();
    creativeTab = new CompatCreativeTabs("lector") {
        @Override
        protected Item getItem() {
            return ModItems.manual;
        }
    };
    this.proxy.preInit(e);
}
 
開發者ID:McJty,項目名稱:Lector,代碼行數:16,代碼來源:Lector.java

示例6: preInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
    logger = event.getModLog();
}
 
開發者ID:Kubithorg,項目名稱:KubidibotsStreamDownloaderFromYoutubeAndDisplayerThanksToAForgeMod,代碼行數:5,代碼來源:Streamer.java

示例7: preInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
	logger = event.getModLog();

	MinecraftForge.EVENT_BUS.register(this);
	MinecraftForge.EVENT_BUS.register(new RestrictionHandler());
	MinecraftForge.EVENT_BUS.register(new PlayerHandler());
	MinecraftForge.EVENT_BUS.register(new DeathHandler());
	MinecraftForge.EVENT_BUS.register(new RescueHandler());
	MinecraftForge.EVENT_BUS.register(proxy);

	CapabilityHardcoreRevival.register();
}
 
開發者ID:blay09,項目名稱:HardcoreRevival,代碼行數:14,代碼來源:HardcoreRevival.java

示例8: preInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
    logger = event.getModLog();

    channel = NetworkRegistry.INSTANCE.newSimpleChannel(CHANNEL);

    int messageNumber = 0;
    channel.registerMessage(SwapItems.Handler.class, SwapItems.class, messageNumber++, Side.SERVER);
    channel.registerMessage(BeltContentsChange.Handler.class, BeltContentsChange.class, messageNumber++, Side.CLIENT);
    logger.debug("Final message number: " + messageNumber);

    File configurationFile = event.getSuggestedConfigurationFile();
    Config.loadConfig(configurationFile);
}
 
開發者ID:gigaherz,項目名稱:ToolBelt,代碼行數:16,代碼來源:ToolBelt.java

示例9: preInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	LOGGER = event.getModLog();
	ModEntities.init();
	ArcaneMagicPacketHandler.registerMessages(ArcaneMagic.MODID);
	proxy.preInit(event);
	MinecraftForge.EVENT_BUS.register(new ModRegistry());
	MinecraftForge.EVENT_BUS.register(new AnimaSubscriber());
	ModRegistry.registerTiles();
	Capabilities.register();
}
 
開發者ID:raphydaphy,項目名稱:ArcaneMagic,代碼行數:13,代碼來源:ArcaneMagic.java

示例10: preInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	logger = event.getModLog();

	proxy.preInit(event);
}
 
開發者ID:DarkMorford,項目名稱:Simple-Chunks,代碼行數:8,代碼來源:SimpleChunks.java

示例11: preInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
    logger = event.getModLog();
    teslaLoaded = Loader.isModLoaded("tesla");
    redstonefluxLoaded = Loader.isModLoaded("redstoneflux");
    immersiveLoaded = Loader.isModLoaded("immersiveengineering");
    ic2Loaded = Loader.isModLoaded("ic2");
    proxy.preInit(event);
}
 
開發者ID:CreeperShift,項目名稱:WirelessCharger,代碼行數:10,代碼來源:Main.java

示例12: preInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent e)
{
    log = e.getModLog();

    setupMetadata(e.getModMetadata());

    configFile = new Configuration(new File(e.getModConfigurationDirectory(), "Purificati Magicae.cfg"));
    config.setup(configFile);

    debug = LogManager.getLogger(MODID + "-debug");

    proxy.setupDrawables();
    getSipRegistry().register();
    TileRegistry.register();
    CapabilityRegistry.register();
    EntityRegistry.register();
    getPapyrusRegistry().setup();
    getExpressionRegistry().setup();
    PMStructureProcessorRegistry.setup();
    getMagibenchRegistry().setup();

    proxy.setupIfTiers();

    proxy.preInit();

}
 
開發者ID:PearXTeam,項目名稱:PurificatiMagicae,代碼行數:28,代碼來源:PurMag.java

示例13: preInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
		configFolder = new File(event.getSuggestedConfigurationFile().getParentFile(), "defier");
		if(!configFolder.exists())configFolder.mkdir();
		config = new Configuration(new File(configFolder, "defier.cfg"), "1.0.0", true);
		ConfigData.load(config);
    logger = event.getModLog();
    NetworkManager.registerMessages();
    proxy.preInit(event);
}
 
開發者ID:tiffit,項目名稱:Defier,代碼行數:11,代碼來源:Defier.java

示例14: preInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
    logger = event.getModLog();
    proxy.preInit(event);
}
 
開發者ID:SirLyle,項目名稱:Lanolin,代碼行數:6,代碼來源:Lanolin.java

示例15: preInit

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
    {
    logger = event.getModLog();
    proxy.preInit(event);
    }
 
開發者ID:EpicSquid,項目名稱:Aeon-Horizons,代碼行數:7,代碼來源:AeonHorizons.java


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