本文整理了Java中net.minecraftforge.common.config.Configuration.load()
方法的一些代码示例,展示了Configuration.load()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.load()
方法的具体详情如下:
包路径:net.minecraftforge.common.config.Configuration
类名称:Configuration
方法名:load
暂无
代码示例来源:origin: Vazkii/Botania
public static void loadConfig(File configFile) {
config = new Configuration(configFile);
config.load();
load();
}
代码示例来源:origin: CoFH/CoFHCore
public ConfigHandler setConfiguration(Configuration config) {
modConfiguration = config;
modConfiguration.load();
return this;
}
代码示例来源:origin: SlimeKnights/Mantle
@Override
public void load()
{
config = new Configuration(new File(this.confPath), "1");
config.load();
}
代码示例来源:origin: McJtyMods/LostCities
private void initProfiles(String[] profileList, boolean isPublic) {
for (String name : profileList) {
LostCityProfile profile = new LostCityProfile(name, LostCityConfiguration.standardProfiles.get(name), isPublic);
Configuration profileCfg = new Configuration(new File(modConfigDir.getPath() + File.separator + "lostcities", "profile_" + name + ".cfg"));
profileCfg.load();
profile.init(profileCfg);
LostCityConfiguration.profiles.put(name, profile);
profileConfigs.put(name, profileCfg);
}
}
代码示例来源:origin: SonarSonic/Calculator
public static void loadBlocks() {
Configuration blocks = new Configuration(new File("config/calculator/Blocks-BlackList.cfg"));
blocks.load();
String[] blockExamples = new String[2];
blockExamples[0] = "ExampleBlock";
blockExamples[1] = "ExampleBlock2";
blocksblackList = blocks.get("Block Config", "Disabled", blockExamples);
blocks.save();
}
代码示例来源:origin: Vazkii/Psi
public static void init(File configFile) {
config = new Configuration(configFile);
config.load();
load();
}
代码示例来源:origin: SonarSonic/Calculator
public static void loadItems() {
Configuration items = new Configuration(new File("config/calculator/Items-BlackList.cfg"));
items.load();
String[] itemExamples = new String[2];
itemExamples[0] = "ExampleItem";
itemExamples[1] = "ExampleItem2";
itemsblackList = items.get("Item Config", "Disabled", itemExamples);
items.save();
}
代码示例来源:origin: superckl/BiomeTweaker
public Config(final File config) {
this.configFile = new Configuration(new File(config, ModData.MOD_NAME+".cfg"));
this.btConfigFolder = config;
this.configFile.load();
if(this.configFile.hasChanged())
this.configFile.save();
}
代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition
public void postInit() {
config.load();
for (IConfigSubscriber subscriber : subscribers) {
subscriber.onConfigChanged(this);
}
save();
}
代码示例来源:origin: vadis365/TheErebus
public void loadConfig(FMLPreInitializationEvent event) {
File configFile = event.getSuggestedConfigurationFile();
configFolder = configFile.getParentFile();
config = new Configuration(configFile);
config.load();
syncConfigs();
}
代码示例来源:origin: Ellpeck/ActuallyAdditions
public ConfigurationHandler(File configFile){
ActuallyAdditions.LOGGER.info("Grabbing Configurations...");
MinecraftForge.EVENT_BUS.register(this);
config = new Configuration(configFile);
config.load();
redefineConfigs();
}
代码示例来源:origin: Azanor/Baubles
public static void initialize(File file)
{
config = new Configuration(file);
config.load();
load();
MinecraftForge.EVENT_BUS.register(ConfigChangeListener.class);
}
代码示例来源:origin: progwml6/Natura
public static void load(FMLPreInitializationEvent event)
{
configFile = new Configuration(event.getSuggestedConfigurationFile(), "0.2", false);
configFile.load();
syncConfig();
}
代码示例来源:origin: Vazkii/Quark
public static void setupConfig(FMLPreInitializationEvent event) {
configFile = event.getSuggestedConfigurationFile();
if(!configFile.exists())
firstLoad = true;
config = new Configuration(configFile);
config.load();
loadConfig();
MinecraftForge.EVENT_BUS.register(EventHandler.class);
}
代码示例来源:origin: ForestryMC/Binnie
public void reload(boolean load) {
if (load) {
config.load();
}
for (IConfigurable configurable : configurables) {
configurable.configure(config);
}
if (config.hasChanged()) {
config.save();
}
}
}
代码示例来源:origin: ForestryMC/Binnie
public void reload(boolean load) {
if (load) {
config.load();
}
for (IConfigurable configurable : configurables) {
configurable.configure(config);
}
if (config.hasChanged()) {
config.save();
}
}
}
代码示例来源:origin: MatrexsVigil/harvestcraft
/**
* call Configure during init
* this allows to dynamically detect biomes and use the FruitRegistry
*/
public void Configure() {
config.load();
ConfigureCommon();
ConfigureFruits();
if (config.hasChanged()) {
config.save();
}
}
代码示例来源:origin: ValkyrienWarfare/Valkyrien-Warfare-Revamped
private void runConfiguration(FMLPreInitializationEvent event) {
configFile = event.getSuggestedConfigurationFile();
config = new Configuration(configFile);
config.load();
applyConfig(config);
config.save();
}
代码示例来源:origin: SleepyTrousers/EnderIO
@SubscribeEvent
public void onConfigFileChanged(ConfigFileChangedEvent event) {
if (event.getModID().equals(factory.getModid())) {
Log.info("Updating config...");
config.load();
syncConfig();
event.setSuccessful();
}
}
代码示例来源:origin: SleepyTrousers/EnderIO
@SubscribeEvent
public void onConfigFileChanged(ConfigFileChangedEvent event) {
if (event.getModID().equals(factory.getModid())) {
Log.info("Updating config...");
config.load();
syncConfig();
event.setSuccessful();
}
}
内容来源于网络,如有侵权,请联系作者删除!