当前位置: 首页>>代码示例>>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;未经允许,请勿转载。