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:
@@ -184,7 +184,7 @@ class BlockDefinitionBuilder implements IBlockBuilder
|
||||
@Override
|
||||
public <T extends IBlockDefinition> T build()
|
||||
{
|
||||
if( !AEConfig.instance.areFeaturesEnabled( features ) )
|
||||
if( !AEConfig.instance().areFeaturesEnabled( features ) )
|
||||
{
|
||||
return (T) new TileDefinition( registryName, null, null );
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class FeatureFactory
|
||||
|
||||
public FeatureFactory()
|
||||
{
|
||||
this.defaultFeatures = new AEFeature[] { AEFeature.Core };
|
||||
this.defaultFeatures = new AEFeature[] { AEFeature.CORE };
|
||||
this.bootstrapComponents = new ArrayList<>();
|
||||
|
||||
if( Platform.isClient() )
|
||||
|
||||
@@ -147,7 +147,7 @@ class ItemDefinitionBuilder implements IItemBuilder
|
||||
@Override
|
||||
public ItemDefinition build()
|
||||
{
|
||||
if( !AEConfig.instance.areFeaturesEnabled( features ) )
|
||||
if( !AEConfig.instance().areFeaturesEnabled( features ) )
|
||||
{
|
||||
return new ItemDefinition( registryName, null );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user