当前位置: 首页>>代码示例>>Java>>正文


Java FMLPreInitializationEvent.getModLog方法代码示例

本文整理汇总了Java中cpw.mods.fml.common.event.FMLPreInitializationEvent.getModLog方法的典型用法代码示例。如果您正苦于以下问题:Java FMLPreInitializationEvent.getModLog方法的具体用法?Java FMLPreInitializationEvent.getModLog怎么用?Java FMLPreInitializationEvent.getModLog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cpw.mods.fml.common.event.FMLPreInitializationEvent的用法示例。


在下文中一共展示了FMLPreInitializationEvent.getModLog方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: preInit

import cpw.mods.fml.common.event.FMLPreInitializationEvent; //导入方法依赖的package包/类
@Override
public void preInit(final @Nonnull FMLPreInitializationEvent event) {
	super.preInit(event);

	Log.log = event.getModLog();
	Config.init(event.getSuggestedConfigurationFile());

	// Setup stencil clip
	// StencilClip.init();

	// Setup location
	Client.initLocation(new Locations(event.getSourceFile(), getDataDirectory()));

	// Get Id
	final String id = Client.mc.getSession().getPlayerID();
	try {
		final Object o = UUIDTypeAdapter.fromString(id);
		if (o!=null) {
			Client.id = id;
			final Session s = Client.mc.getSession();
			Client.name = s.getUsername();
			Client.token = s.getToken();
		}
	} catch (final IllegalArgumentException e) {
	}
}
 
开发者ID:Team-Fruit,项目名称:SignPicture,代码行数:27,代码来源:ClientProxy.java

示例2: preInit

import cpw.mods.fml.common.event.FMLPreInitializationEvent; //导入方法依赖的package包/类
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent e)
{
    if (!CreeperHost.instance.active)
        return;
    MinecraftForge.EVENT_BUS.register(this);
    FMLCommonHandler.instance().bus().register(this);
    logger = e.getModLog();
}
 
开发者ID:CreeperHost,项目名称:CreeperHostGui,代码行数:10,代码来源:CreeperHostServer.java

示例3: ConfigLoader

import cpw.mods.fml.common.event.FMLPreInitializationEvent; //导入方法依赖的package包/类
public ConfigLoader(FMLPreInitializationEvent event)
{
    logger = event.getModLog();
    config = new Configuration(event.getSuggestedConfigurationFile());

    config.load();
    load();
}
 
开发者ID:PurplePopo,项目名称:InformationCraft,代码行数:9,代码来源:ConfigLoader.java

示例4: preInit

import cpw.mods.fml.common.event.FMLPreInitializationEvent; //导入方法依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent e) {
	log = e.getModLog();
	//MinecraftForge.EVENT_BUS.register(this);
	//FMLCommonHandler.instance().bus().register(this);
	config = new Configuration(e.getSuggestedConfigurationFile());
	//config.load();
	tab = CreativeTab.instance;
	item = new ItemPackage();
	GameRegistry.registerItem(item, "cheatycomputers.package");
}
 
开发者ID:Vexatos,项目名称:CheatyComputers,代码行数:12,代码来源:CheatyComputers.java

示例5: preInit

import cpw.mods.fml.common.event.FMLPreInitializationEvent; //导入方法依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent e) {
	log = e.getModLog();
	MinecraftForge.EVENT_BUS.register(this);
	//FMLCommonHandler.instance().bus().register(this);

	automaTable = new BlockAutomaTable();
	GameRegistry.registerBlock(automaTable, ItemBlockAutomaTable.class, "peccatura.AutomaTable");
	GameRegistry.registerTileEntity(TileAutomaTable.class, "peccatura.AutomaTable");
}
 
开发者ID:Vexatos,项目名称:ARE-WE-END-GAME-YET,代码行数:11,代码来源:Peccatura.java

示例6: preInit

import cpw.mods.fml.common.event.FMLPreInitializationEvent; //导入方法依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
   	modLog = event.getModLog();
	ItemsHZDS.init();
}
 
开发者ID:TwilightWingsStudio,项目名称:HazardsLib,代码行数:7,代码来源:HazardsLib.java

示例7: preInit

import cpw.mods.fml.common.event.FMLPreInitializationEvent; //导入方法依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event){
    logger = event.getModLog();


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

    Property enabledProp = config.get(CAT_GENERAL, "enabled", false);
    enabledProp.comment = "The mod is disabled by default. Change this to true to generate cache the next startup";
    solderConfig.setEnabled(enabledProp.getBoolean());

    Property portProperty = config.get(CAT_WEBSERVER, "port", 8000);
    portProperty.comment = "The port the webserver runs on.\n"
            + "You should set this on a nonstandard port and use a proxy "
            + "to serve the api. It is mapped to /";

    URI baseUri = UriBuilder.fromUri("http://localhost/").port(portProperty.getInt()).build();
    solderConfig.setBaseUri(baseUri);

    Property apiKeyProperty = config.get(CAT_TECHNIC, "apiKey", "INVALID_KEY");
    apiKeyProperty.comment = "The apiKey on Technic Platform";
    solderConfig.setApiKey(apiKeyProperty.getString());

    Property modpackNameProperty = config.get(CAT_TECHNIC, "modpackName", "MyModpack");
    modpackNameProperty.comment = "The name of the modpack. Should be the same name as on technic platform";
    solderConfig.setModpackName( modpackNameProperty.getString());

    Property modpackVersionProperty = config.get(CAT_TECHNIC, "modpackVersion", "0.1");
    modpackVersionProperty.comment = "Version of the modpack. It's the current installed version";
    solderConfig.setModpackVersion(modpackVersionProperty.getString());

    Property mirrorUrlProperty = config.get(CAT_WEBSERVER, "mirrorUrl", "http://localhost:8000/download/");
    mirrorUrlProperty.comment = "The external URL to expose downloads";
    solderConfig.setMirrorUrl(mirrorUrlProperty.getString());

    Property javaArgs = config.get(CAT_LAUNCHER, "javaArgs", "");
    javaArgs.comment = "Java ARGS for the client";
    solderConfig.setJavaArgs(javaArgs.getString());

    Property javaMem = config.get(CAT_LAUNCHER, "javaMem", "1G");
    javaMem.comment  = "Java default Memory for the client";
    solderConfig.setJavaMem(javaMem.getString());

    config.save();
}
 
开发者ID:admiral0,项目名称:MinecraftSolder,代码行数:47,代码来源:MinecraftSolder.java

示例8: preInit

import cpw.mods.fml.common.event.FMLPreInitializationEvent; //导入方法依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent e) {
	logger = e.getModLog();
	Config.init(e.getSuggestedConfigurationFile());
    proxy.preInit(e);
}
 
开发者ID:java8compiler,项目名称:OpenTeleporter,代码行数:7,代码来源:OpenTeleporter.java

示例9: ModConfig

import cpw.mods.fml.common.event.FMLPreInitializationEvent; //导入方法依赖的package包/类
public ModConfig(FMLPreInitializationEvent event) {
    logger = event.getModLog();
    config = new Configuration(event.getSuggestedConfigurationFile());
    load();
}
 
开发者ID:GWYOG,项目名称:GTVeinLocator,代码行数:6,代码来源:ModConfig.java

示例10: preInit

import cpw.mods.fml.common.event.FMLPreInitializationEvent; //导入方法依赖的package包/类
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	
	Configuration config = new Configuration(event.getSuggestedConfigurationFile());
	event.getModConfigurationDirectory();
	event.getModConfigurationDirectory();
	event.getModLog();
	event.getModMetadata();
	event.getModState();
	event.getSide();
	event.getVersionProperties();
	
	
	config.load();
	config.getLoadedConfigVersion();
	
	
	CUSTOM_HAMMER_1 = config.get(CATEGORY_CUSTOM_HAMMERS, "Enable Custom Hammer 1", false).getBoolean(false);
	CUSTOM_HAMMER_1_NAME = config.get(CATEGORY_CUSTOM_HAMMERS, "Custom Hammer 1 Internal Name", "CustomHammer1");
	CUSTOM_HAMMER_1_LANG_NAME = config.get(CATEGORY_CUSTOM_HAMMERS, "Custom Hammer 1 Name", "Custom Hammer 1");
	CUSTOM_HAMMER_1_TOOLMATERIAL = config.get(CATEGORY_CUSTOM_HAMMERS, "Custom Hammer 1 Tool Material", "IRON");
	CUSTOM_HAMMER_1_MATERIALMODIFIER = config.get(CATEGORY_CUSTOM_HAMMERS, "Custom Hammer 1 Material Modifier", 16);
	CUSTOM_HAMMER_1_TEXTURE = config.get(CATEGORY_CUSTOM_HAMMERS, "Custom Hammer 1 Texture", "hammermod:\\custom\\custom_1");
	CUSTOM_HAMMER_DESC_1 = config.get(CATEGORY_CUSTOM_HAMMERS, "Custom Hammer 1 Description", "I'm A Custom Hammer");
	CUSTOM_HAMMER_1_CRAFT = config.get(CATEGORY_CUSTOM_HAMMERS, "Custom Hammer 1 Crafting Recipe", "XXX, NSN, NSN, 'X', Items.ingotIron, 'S', Items.stick");
	CUSTOM_HAMMER_1_ENCHANT_GLINT = config.get(CATEGORY_CUSTOM_HAMMERS, "Custom Hammer 1 Enchantment Effect", false).getBoolean(false);
	
	SMASH_BREAK_SOUND = config.get(CATEGORY_SETTINGS, "HammerCustomBreakSound", false).getBoolean(false);
	TOASTER_BREAK_SOUND = config.get(CATEGORY_SETTINGS, "ToasterCustomBreakSound", true).getBoolean(true);
	RANDOM_TOAST = config.get(CATEGORY_SETTINGS, "RandomToast", false).getBoolean(false);
	SHARP_TOAST = config.get(CATEGORY_SETTINGS, "SharpToast", false).getBoolean(false);
	DEBUG_MODE  = config.get(CATEGORY_SETTINGS, "DebugMode", false).getBoolean(false);
	
	//config.addCustomCategoryComment(CATEGORY_INFO, "This Configfile is still [WIP] and may not work properly. ***Some things won't work!");
	config.addCustomCategoryComment(CATEGORY_CUSTOM_HAMMERS, "Custom Hammer Settings");
	config.addCustomCategoryComment(CATEGORY_SETTINGS, "Settings");
	//config.getCategoryNames();
		
	config.save();
	
	event.getModLog();
	event.getModState();
	//Configuration configFile = new Configuration(event.getSuggestedConfigurationFile());
	
	//loadConfiguration(configFile);
	
	System.out.println(MODID + " >>> Configuration File Loaded");
	
	
	ModRegistry.registerMods();
	PlayerChecker.checkPlayer(username);
}
 
开发者ID:jtrent238,项目名称:Hammer-Mod,代码行数:54,代码来源:HammerMod.java

示例11: preInit

import cpw.mods.fml.common.event.FMLPreInitializationEvent; //导入方法依赖的package包/类
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent e)
{
    BetterChat.bLog = e.getModLog();
    proxy.preInit(e);
}
 
开发者ID:mads256c,项目名称:BetterChat,代码行数:7,代码来源:BetterChat.java

示例12: preInit

import cpw.mods.fml.common.event.FMLPreInitializationEvent; //导入方法依赖的package包/类
public void preInit(final FMLPreInitializationEvent event) {
	Reference.logger = event.getModLog();

	EEWReciever2.locations = new Locations(event);

	if (!EEWReciever2.locations.modCfgDir.exists())
		if (!EEWReciever2.locations.modCfgDir.mkdir())
			Reference.logger.warn("Could not create Condiguration Directory[{}]!", EEWReciever2.locations.modCfgDir);

	EEWReciever2.locations.checkLegacy(event.getModConfigurationDirectory());

	ConfigHandler.instance = new ConfigHandler(new File(EEWReciever2.locations.modCfgDir, Reference.MODID+".cfg"));

	OvservationPredictor.instance().init();
}
 
开发者ID:Team-Fruit,项目名称:EEWReciever,代码行数:16,代码来源:CommonProxy.java


注:本文中的cpw.mods.fml.common.event.FMLPreInitializationEvent.getModLog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。