本文整理了Java中net.minecraftforge.common.config.Configuration.hasChanged()
方法的一些代码示例,展示了Configuration.hasChanged()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.hasChanged()
方法的具体详情如下:
包路径:net.minecraftforge.common.config.Configuration
类名称:Configuration
方法名:hasChanged
暂无
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
public void save()
{
if( this.config.hasChanged() )
{
this.config.save();
}
}
}
代码示例来源:origin: Vazkii/Botania
public static void loadPostInit() {
if(enableShedding)
SheddingHandler.loadFromConfig(config);
if(config.hasChanged())
config.save();
}
代码示例来源:origin: SlimeKnights/TinkersConstruct
if(Config.configFile.hasChanged()) {
Config.configFile.save();
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
if( configurartion.hasChanged() )
代码示例来源:origin: McJtyMods/ModTutorials
public void postInit(FMLPostInitializationEvent e) {
if (config.hasChanged()) {
config.save();
}
}
代码示例来源:origin: Direwolf20-MC/BuildingGadgets
public void postInit() {
if (config.hasChanged()) {
config.save();
}
}
代码示例来源:origin: SlimeKnights/Mantle
@Override
public void flush()
{
if (config.hasChanged())
{
config.save();
}
}
代码示例来源:origin: SlimeKnights/TinkersConstruct
if(configFile.hasChanged()) {
configFile.save();
changed = true;
if(pulseConfig.getConfig().hasChanged()) {
pulseConfig.flush();
changed = true;
代码示例来源:origin: Azanor/Baubles
public static void load() {
String desc = "Set this to false to disable rendering of baubles in the player.";
renderBaubles = config.getBoolean("baubleRender.enabled",
Configuration.CATEGORY_CLIENT, renderBaubles, desc);
if(config.hasChanged()) config.save();
}
代码示例来源:origin: Ellpeck/ActuallyAdditions
public static void redefineConfigs(){
ConfigValues.defineConfigValues(config);
if(config.hasChanged()){
config.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: 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: McJtyMods/DeepResonance
@Override
public void postInit(FMLPostInitializationEvent e) {
super.postInit(e);
if (mainConfig.hasChanged()) {
mainConfig.save();
}
mainConfig = null;
WrenchChecker.init();
}
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
private static void toggleWorkboundsConfigValue() {
String newValue = "true";
if ("true".equals(AutomationCategory.renderWorkBounds.get()))
newValue = "false";
AutomationCategory.renderWorkBounds.set(newValue);
if (AncientWarfareAutomation.statics.getConfig().hasChanged())
AncientWarfareAutomation.statics.getConfig().save();
}
}
代码示例来源:origin: vadis365/TheErebus
public void initOreConfigs() {
for (OreType oretype : OreType.values())
oretype.setEnabled(config.get("Ores", "Generate " + oretype.toString().toLowerCase(), oretype.isEnabled()).getBoolean(oretype.isEnabled()));
if (config.hasChanged())
config.save();
}
代码示例来源:origin: mezz/JustEnoughItems
public static void saveFilterText() {
if (worldConfig != null) {
NetworkManager networkManager = FMLClientHandler.instance().getClientToServerNetworkManager();
final String worldCategory = ServerInfo.getWorldUid(networkManager);
Property property = worldConfig.get(worldCategory, "filterText", defaultValues.filterText);
property.set(values.filterText);
if (worldConfig.hasChanged()) {
worldConfig.save();
}
}
}
代码示例来源:origin: ExtraCells/ExtraCells2
public void reload() {
shortenedBuckets = config.get("Tooltips", "shortenedBuckets", true, "Shall the guis shorten large mB values?").getBoolean(true);
dynamicTypes = config.get("Storage Cells", "dynamicTypes", true, "Should the mount of bytes needed for a new type depend on the cellsize?").getBoolean(true);
ExtraCells.integration.loadConfig(config);
if (config.hasChanged()) {
config.save();
}
}
代码示例来源:origin: Lunatrius/Schematica
public static void loadConfiguration() {
loadConfigurationDebug();
loadConfigurationRender();
loadConfigurationPrinter();
loadConfigurationSwapSlots();
loadConfigurationGeneral();
loadConfigurationServer();
Schematica.proxy.createFolders();
if (configuration.hasChanged()) {
configuration.save();
}
}
代码示例来源:origin: Vazkii/Botania
mushroomQuantity = loadPropInt("worldgen.mushroom.quantity", desc, mushroomQuantity);
if(config.hasChanged())
config.save();
内容来源于网络,如有侵权,请联系作者删除!