當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。