本文整理汇总了Java中net.minecraftforge.common.Configuration.load方法的典型用法代码示例。如果您正苦于以下问题:Java Configuration.load方法的具体用法?Java Configuration.load怎么用?Java Configuration.load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.common.Configuration
的用法示例。
在下文中一共展示了Configuration.load方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: preInit
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
@PreInit
public void preInit(FMLPreInitializationEvent event) {
apLogger.setParent(FMLLog.getLogger());
apLogger.info("[Apocalyptic] Starting pre-initialization");
apLogger.info("[Apocalyptic] Loading configuration");
isServer = event.getSide().isServer();
Configuration config = new Configuration(event.getSuggestedConfigurationFile());
tePerChunk = config.get("general", "TileEntitiesPerChunk", 900).getInt(900);
silverfishChance = config.get("general", "SilverfishSpawnChance", 0.001).getDouble(0.001);
transferLimit = config.get("transfer", "limit", new String[]{"0:0:0", "1:X:1"}).getStringList();
transferTagRemove = config.get("transfer", "tag-remove", new String[]{"0:0", "1:X"}).getStringList();
//databaseURL = config.get("database", "URL", "jdbc:mysql://site.ru:3306/database").getString();
//databaseUsername = config.get("database", "Username", "Username").getString();
//databasePassword = config.get("database", "Password", "Password").getString();
config.load();
config.save();
this.initCustomPotions(event);
apLogger.info("[Apocalyptic] Pre-initialization completed");
}
示例2: preInit
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
Configuration config = new Configuration(
event.getSuggestedConfigurationFile());
config.load();
itemCoinID = config.getItem("itemCoin", itemCoinID).getInt();
itemSSTackID = config.getItem("itemSmallCoinStack", itemSSTackID).getInt();
itemLStackID = config.getItem("itemLargeCoinStack", itemLStackID).getInt();
itemHeapID = config.getItem("itemCoinHeap", itemHeapID).getInt();
itemSellerID = config.getItem("itemSeller", itemSellerID).getInt();
blockTradeStationID = config.getBlock("blockTradeStation", blockTradeStationID).getInt();
config.save();
}
示例3: loadConfig
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
/**
* Loads configurations from the properties file.<br>
* - Remote item ID: (Remote.ID)<br>
*/
private static void loadConfig() {
Configuration wirelessconfig = ConfigurationLib.getConfig();
wirelessconfig.load();
remoteID = wirelessconfig.get(Configuration.CATEGORY_ITEM,
ItemLib.REMOTE,
remoteID).getInt();
duraTogg = wirelessconfig.get(Configuration.CATEGORY_GENERAL,
"Duration Toggle",
duraTogg).getBoolean(duraTogg);
pulseTime = wirelessconfig.get(Configuration.CATEGORY_GENERAL,
"Pulse Time",
pulseTime).getInt();
maxPulseThreads = wirelessconfig.get(Configuration.CATEGORY_GENERAL,
"Max Threads",
maxPulseThreads).getInt();
wirelessconfig.save();
}
示例4: init
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
public static void init(File file)
{
Configuration config = new Configuration(file);
config.load();
/** Tooltip Sector **/
config.addCustomCategoryComment("Tooltip Options", "These are the options used to control how WikiLink displays tooltips on items when hovering over them in the inventory.");
includeTooltipsOnItems = config.get("Tooltip Options", "includeTooltipsOnItems", true).getBoolean(true);
/** Link Selection Sector **/
config.addCustomCategoryComment("Link Selection", "These are the options used to control the different links that appear inside of the WikiLink Menu.");
enableWiki = config.get("Link Selection", "enableWiki", true).getBoolean(true);
enableGoogle = config.get("Link Selection", "enableGoogle", true).getBoolean(true);
enableThread = config.get("Link Selection", "enableThread", true).getBoolean(true);
enableWebsite = config.get("Link Selection", "enableWebsite", true).getBoolean(true);
enableYoutube = config.get("Link Selection", "enableYoutube", true).getBoolean(true);
enableSummarize = config.get("Link Selection", "enableSummarize", true).getBoolean(true);
/** Link Shortener Sector **/
config.addCustomCategoryComment("Link Shortener Options", "These are the options to change how WikiLink shortens all of it's hyperlinks.");
shortenHyperlinks = config.get("Link Shortener Options", "shortenHyperlinks", true, "Use bit.ly to shorten links generated by WikiLink").getBoolean(true);
debugMode = config.get("Debug Options", "debugMode", false, "Use this during startup/runtime to get your console spammed curtosy of WikiLink :)").getBoolean(false);
config.save();
}
示例5: loadConfig
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
public static void loadConfig(FMLPreInitializationEvent event) {
Configuration config = new Configuration(event.getSuggestedConfigurationFile());
config.load();
teamSelectionId = config.getBlock("teamSelectionBlock", 500).getInt();
unbreakableGlassId = config.getBlock("unbreakableGlass", 501).getInt();
gameMod = config.get(Configuration.CATEGORY_GENERAL, "gameMod", "onlinefreak").getString();
dimensionId = config.get(Configuration.CATEGORY_GENERAL, "dimensionId", 5).getInt();
maxTeams = config.get(Configuration.CATEGORY_GENERAL, "maxTeams", 7).getInt();
pvpPreventionMinutes = config.get(Configuration.CATEGORY_GENERAL, "pvpPreventionMinutes", 30).getInt();
pvpFriendlyFireOn = config.get("PVP", "pvpFriendlyFireOn", false).getBoolean(false);
if (pvpPreventionMinutes < 0)
pvpPreventionMinutes = 0;
config.save();
}
示例6: preInit
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent evt)
{
Configuration config = new Configuration(evt.getSuggestedConfigurationFile());
config.load();
Property itemsList = config.get(Configuration.CATEGORY_GENERAL, "LightItems", "50,89=12,348=10,91,327,76=10,331=10,314=14");
itemsList.comment = "Item IDs that shine light while held. Armor Items also work when worn. [ONLY ON OTHERS] Syntax: ItemID[-MetaValue]:LightValue, seperated by commas";
itemsMap = new ItemConfigHelper(itemsList.getString(), 15);
Property updateI = config.get(Configuration.CATEGORY_GENERAL, "update Interval", 1000);
updateI.comment = "Update Interval time for all other player entities in milliseconds. The lower the better and costlier.";
updateInterval = updateI.getInt();
config.save();
}
示例7: initialize
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
public static void initialize(File file) {
Configuration config = new Configuration(file);
config.load();
PlanksID = config.getBlock("Plank IDs", 509).getInt();
StonesID = config.getBlock("Stone IDs", 510).getInt();
StoneBricksID = config.getBlock("Stone Brick IDs", 511).getInt();
ReinforcedBricksID = config.getBlock("Reinforced Brick IDs", 512).getInt();
Rare = config.get("Generation", "Rarity of Stones", 3).getInt();
for (String id : config.get("Generation", "Allowed Dimension ID", "0,").getString().split(",")) {
try {
allowed.add(Integer.parseInt(id.trim()));
} catch (NumberFormatException e) {
}
}
config.save();
}
示例8: preInit
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
Configuration config = new Configuration(
event.getSuggestedConfigurationFile());
config.load();
backupEnabled = config.get(Configuration.CATEGORY_GENERAL, "BackupEnabled", true).getBoolean(true);
backupInterval = config.get(Configuration.CATEGORY_GENERAL,
"BackupInterval", 15 * 60).getInt();
backupRoot = config.get(Configuration.CATEGORY_GENERAL, "BackupRoot",
"CCYBackup").getString();
config.save();
}
示例9: init
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
public static void init(File configFileCPU) {
Configuration configCpu = new Configuration(configFileCPU);
configCpu.load();
//Blocks
Ids.actualElectrolyser = configCpu.getBlock(configCpu.CATEGORY_BLOCK, Names.Electrolyser_BlockName, Ids.baseElectrolyser).getInt();
Ids.actualFluidMercury = configCpu.getBlock(configCpu.CATEGORY_BLOCK, Names.FluidMercury_FluidName, Ids.baseFluidMercury).getInt();
//Items
Ids.actualEmptyCell = configCpu.getItem(configCpu.CATEGORY_ITEM, Names.EmptyCell_ItemName, Ids.baseEmptyCell).getInt() - 256;
Ids.actualWaterCell = configCpu.getItem(configCpu.CATEGORY_ITEM, Names.WaterCell_ItemName, Ids.baseWaterCell).getInt() - 256;
Ids.actualLavaCell = configCpu.getItem(configCpu.CATEGORY_ITEM, Names.LavaCell_ItemName, Ids.baseLavaCell).getInt() - 256;
Ids.actualMercuryBucket = configCpu.getItem(configCpu.CATEGORY_ITEM, Names.BucketMercury_FluidName, Ids.baseMercuryBucket).getInt() - 256;
Ids.actualRFReader = configCpu.getItem(configCpu.CATEGORY_ITEM, Names.RFReader_ItemName, Ids.baseRFReader).getInt();
Ids.actualElementCellT = configCpu.getItem(configCpu.CATEGORY_ITEM, Names.ElementsCell_ItemName, Ids.baseElementCell).getInt();
//RetroGen
configCpu.addCustomCategoryComment("Retrogen", "Regen Ores In An Already Present World");
SpecialConfig.RegenFluidMercury = configCpu.get("Retrogen", "Fluid Mercury", false).getBoolean(false);
//End
configCpu.save();
}
示例10: init
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
public static void init(FMLPreInitializationEvent event) {
Configuration config = new Configuration(event.getSuggestedConfigurationFile());
config.load();
helmet = config.getItem("pigtitehelmet", 2222).getInt();
chestplate= config.getItem("pigtitechestplate", 2223).getInt();
leggings= config.getItem("pigtiteleggings", 2224).getInt();
boots= config.getItem("pigtiteboots", 2225).getInt();
pickaxe= config.getItem("pigtitepickaxe", 2226).getInt();
sword= config.getItem("pigtitesword", 2227).getInt();
axe= config.getItem("pigtiteaxe", 2228).getInt();
hoe= config.getItem("pigtitehoe", 2229).getInt();
shovel= config.getItem("pigtiteshovel", 2230).getInt();
multi= config.getItem("pigtitepaxel", 2232).getInt();
bow = config.getItem("pigtitebow", 2233).getInt();
pigtite = config.getItem("pigtite", 2231).getInt();
bacon = config.getItem("bacon", 2234).getInt();
ore = config.getBlock("pigtiteore", 2232).getInt();
spawnGnomorian = config.getItem("spawnGnomorian", 2236).getInt();
spawnBudder92 = config.getItem("spawnBudder92", 2236).getInt();
spawndomonator12 = config.getItem("spawndomonator12", 2236).getInt();
spawnjo10Trot = config.getItem("spawnjo10Trot", 2236).getInt();
spawnMIXERRULES = config.getItem("spawnMIXERRULES", 2236).getInt();
spawnMonkrules10 = config.getItem("spawnMonkrules10", 2236).getInt();
spawnfameblue = config.getItem("spawnfameblue", 2237).getInt();
spawnMyskitBread = config.getItem("spawnMyskitBread", 2238).getInt();
spawnrducey99 = config.getItem("spawnrducey99", 2239).getInt();
spawnVinbullet = config.getItem("spawnVinbullet", 2240).getInt();
config.save();
}
示例11: preInit
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
Configuration config = new Configuration(event.getSuggestedConfigurationFile());
config.load();
mineticketServer = config
.get("server", "mineticket_server", "http://mineticket.alienmc.co").getString();
apiKey = config.get("server", "api_key", "").getString();
config.save();
}
示例12: loadConfig
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
private static void loadConfig() {
Configuration wirelessconfig = ConfigurationLib.getConfig();
wirelessconfig.load();
pdID = wirelessconfig.get(Configuration.CATEGORY_ITEM,
ItemLib.POWER_DIR,
6243).getInt();
wirelessconfig.save();
}
示例13: loadConfig
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
private static void loadConfig() {
Configuration wirelessconfig = ConfigurationLib.getConfig();
wirelessconfig.load();
camouID = wirelessconfig.get(Configuration.CATEGORY_ITEM,
"Camouflager",
camouID).getInt();
wirelessconfig.save();
}
示例14: loadConfig
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
private void loadConfig(File file)
{
Configuration config = new Configuration(file);
config.load();
starterID = config.getItem("armorID", 23483, "The starting ID for the armor, automatically incremented for all 4 items.").getInt() - 256;
realID = starterID + 256;
config.save();
}
示例15: preInit
import net.minecraftforge.common.Configuration; //导入方法依赖的package包/类
@PreInit
public void preInit(FMLPreInitializationEvent event) {
//load the last good configuration
config = new Configuration(event.getSuggestedConfigurationFile());
config.load();
readConfig();
}