本文整理匯總了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) {
}
}
示例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();
}
示例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();
}
示例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");
}
示例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");
}
示例6: preInit
import cpw.mods.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
modLog = event.getModLog();
ItemsHZDS.init();
}
示例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();
}
示例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);
}
示例9: ModConfig
import cpw.mods.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
public ModConfig(FMLPreInitializationEvent event) {
logger = event.getModLog();
config = new Configuration(event.getSuggestedConfigurationFile());
load();
}
示例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);
}
示例11: preInit
import cpw.mods.fml.common.event.FMLPreInitializationEvent; //導入方法依賴的package包/類
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent e)
{
BetterChat.bLog = e.getModLog();
proxy.preInit(e);
}
示例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();
}