本文整理了Java中net.minecraftforge.common.config.Configuration.save()
方法的一些代码示例,展示了Configuration.save()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.save()
方法的具体详情如下:
包路径:net.minecraftforge.common.config.Configuration
类名称:Configuration
方法名:save
暂无
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
@Override
public void onWorldStop()
{
this.config.save();
this.lastPlayerID = 0;
}
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
@Override
public void save()
{
this.config.save();
}
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
public void save()
{
if( this.config.hasChanged() )
{
this.config.save();
}
}
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
/**
* Stores the current date in milli seconds into the "lastCheck" field of the config and makes it persistent.
*/
public void updateLastCheck()
{
final Date now = new Date();
final long nowInMs = now.getTime();
final String nowAsString = Long.toString( nowInMs );
this.config.get( "cache", "lastCheck", "0" ).set( nowAsString );
this.config.save();
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
@Override
public void setCache( @Nonnull final String digest )
{
final Property digestProperty = this.config.get( CACHE_CATEGORY, DIGEST_KEY, DIGEST_DEFAULT );
digestProperty.set( digest );
this.config.save();
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
@Override
public void onWorldStart()
{
this.lastPlayerID = this.config.get( LAST_PLAYER_CATEGORY, LAST_PLAYER_KEY, LAST_PLAYER_DEFAULT ).getInt( LAST_PLAYER_DEFAULT );
this.config.save();
}
代码示例来源:origin: Vazkii/Botania
public static void loadPostInit() {
if(enableShedding)
SheddingHandler.loadFromConfig(config);
if(config.hasChanged())
config.save();
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
@Override
public void onWorldStop()
{
// populate new data
for( final GridStorageSearch gs : this.loadedStorage.keySet() )
{
final GridStorage thisStorage = gs.getGridStorage().get();
if( thisStorage != null && thisStorage.getGrid() != null && !thisStorage.getGrid().isEmpty() )
{
final String value = thisStorage.getValue();
this.config.get( GRID_STORAGE_CATEGORY, String.valueOf( thisStorage.getID() ), value ).set( value );
}
}
this.config.save();
}
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
@Override
public int getPlayerID( @Nonnull final GameProfile profile )
{
Preconditions.checkNotNull( profile );
Preconditions.checkNotNull( this.config.getCategory( "players" ) );
Preconditions.checkState( profile.isComplete() );
final ConfigCategory players = this.config.getCategory( "players" );
final String uuid = profile.getId().toString();
final Property maybePlayerID = players.get( uuid );
if( maybePlayerID != null && maybePlayerID.isIntValue() )
{
return maybePlayerID.getInt();
}
else
{
final int newPlayerID = this.nextPlayer();
final Property newPlayer = new Property( uuid, String.valueOf( newPlayerID ), Property.Type.INTEGER );
players.put( uuid, newPlayer );
this.playerMapping.put( newPlayerID, profile.getId() ); // add to reverse map
this.config.save();
return newPlayerID;
}
}
代码示例来源:origin: SlimeKnights/TinkersConstruct
Config.configFile.save();
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
configurartion.save();
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
@Override
public void save()
{
if( this.isFeatureEnabled( AEFeature.SPATIAL_IO ) )
{
this.get( "spatialio", "storageProviderID", this.storageProviderID ).set( this.storageProviderID );
this.get( "spatialio", "storageDimensionID", this.storageDimensionID ).set( this.storageDimensionID );
}
this.get( "Client", "PowerUnit", this.selectedPowerUnit.name(), this.getListComment( this.selectedPowerUnit ) ).set( this.selectedPowerUnit.name() );
if( this.hasChanged() )
{
super.save();
}
}
代码示例来源:origin: RS485/LogisticsPipes
@Override
public void tick() {
//Save Language Database
if (saveThreadTime != 0) {
if (saveThreadTime < System.currentTimeMillis()) {
saveThreadTime = 0;
langDatabase.save();
LogisticsPipes.log.info("LangDatabase saved");
}
}
}
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
@Override
public void save() {
super.save();
foodConfig.save();
factionConfig.save();
}
}
代码示例来源:origin: SlimeKnights/TinkersConstruct
if(forgeProp != null) {
forgeProp.set(true);
ForgeModContainer.getConfig().save();
configFile.save();
changed = true;
代码示例来源:origin: Ellpeck/ActuallyAdditions
public static void redefineConfigs(){
ConfigValues.defineConfigValues(config);
if(config.hasChanged()){
config.save();
}
}
代码示例来源:origin: WayofTime/BloodMagic
public void syncConfig() {
config.addCustomCategoryComment("rituals", "Toggles for all rituals");
rituals.forEach((k, v) -> config.getBoolean(k, "rituals", true, "Enable the " + k + " ritual."));
imperfectRituals.forEach((k, v) -> config.getBoolean(k, "rituals.imperfect", true, "Enable the " + k + " imperfect ritual."));
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: Lunatrius/Schematica
public static void loadConfiguration() {
loadConfigurationDebug();
loadConfigurationRender();
loadConfigurationPrinter();
loadConfigurationSwapSlots();
loadConfigurationGeneral();
loadConfigurationServer();
Schematica.proxy.createFolders();
if (configuration.hasChanged()) {
configuration.save();
}
}
代码示例来源:origin: Vazkii/Botania
config.save();
内容来源于网络,如有侵权,请联系作者删除!