Refactored AEConfig (#2633)
Added a singleton getter instead the public field. Reduced all fields to private. Replaced field access with getters. Added setters where necessary (Dimension/Biome Registration) Added config options to disable more features. Splitted Enum name from the config key. Changed FacadeConfig and Networkhandler similar to AEConfig.init().
This commit is contained in:
+2
-2
@@ -99,7 +99,7 @@ public class PathGridCache implements IPathingGrid
|
||||
this.updateNetwork = false;
|
||||
this.setChannelsInUse( 0 );
|
||||
|
||||
if( !AEConfig.instance.isFeatureEnabled( AEFeature.Channels ) )
|
||||
if( !AEConfig.instance().isFeatureEnabled( AEFeature.CHANNELS ) )
|
||||
{
|
||||
final int used = this.calculateRequiredChannels();
|
||||
|
||||
@@ -339,7 +339,7 @@ public class PathGridCache implements IPathingGrid
|
||||
|
||||
private void achievementPost()
|
||||
{
|
||||
if( this.lastChannels != this.getChannelsInUse() && AEConfig.instance.isFeatureEnabled( AEFeature.Channels ) )
|
||||
if( this.lastChannels != this.getChannelsInUse() && AEConfig.instance().isFeatureEnabled( AEFeature.CHANNELS ) )
|
||||
{
|
||||
final Achievements currentBracket = this.getAchievementBracket( this.getChannelsInUse() );
|
||||
final Achievements lastBracket = this.getAchievementBracket( this.lastChannels );
|
||||
|
||||
+2
-2
@@ -159,8 +159,8 @@ public class SpatialPylonCache implements ISpatialCache
|
||||
this.efficiency = 0.0;
|
||||
}
|
||||
|
||||
minPower = (double) reqX * (double) reqY * reqZ * AEConfig.instance.spatialPowerMultiplier;
|
||||
maxPower = Math.pow( minPower, AEConfig.instance.spatialPowerExponent );
|
||||
minPower = (double) reqX * (double) reqY * reqZ * AEConfig.instance().getSpatialPowerMultiplier();
|
||||
maxPower = Math.pow( minPower, AEConfig.instance().getSpatialPowerExponent() );
|
||||
}
|
||||
|
||||
final double affective_efficiency = Math.pow( this.efficiency, 0.25 );
|
||||
|
||||
Reference in New Issue
Block a user