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:
@@ -122,7 +122,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench /
|
||||
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketClick( pos, side, hitX, hitY, hitZ, hand ) );
|
||||
NetworkHandler.instance().sendToServer( new PacketClick( pos, side, hitX, hitY, hitZ, hand ) );
|
||||
}
|
||||
|
||||
return EnumActionResult.SUCCESS;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ToolChargedStaff extends AEBasePoweredItem
|
||||
|
||||
public ToolChargedStaff()
|
||||
{
|
||||
super( AEConfig.instance.chargedStaffBattery );
|
||||
super( AEConfig.instance().getChargedStaffBattery() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -100,7 +100,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
|
||||
public ToolColorApplicator()
|
||||
{
|
||||
super( AEConfig.instance.colorApplicatorBattery );
|
||||
super( AEConfig.instance().getColorApplicatorBattery() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
|
||||
public ToolEntropyManipulator()
|
||||
{
|
||||
super( AEConfig.instance.entropyManipulatorBattery );
|
||||
super( AEConfig.instance().getEntropyManipulatorBattery() );
|
||||
|
||||
this.heatUp = new HashMap<InWorldToolOperationIngredient, InWorldToolOperationResult>();
|
||||
this.coolDown = new HashMap<InWorldToolOperationIngredient, InWorldToolOperationResult>();
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
|
||||
|
||||
public ToolMatterCannon()
|
||||
{
|
||||
super( AEConfig.instance.matterCannonBattery );
|
||||
super( AEConfig.instance().getMatterCannonBattery() );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -271,7 +271,7 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
|
||||
}
|
||||
|
||||
pos.entityHit.attackEntityFrom( DamageSource.causePlayerDamage( p ), 0 );
|
||||
NetworkHandler.instance.sendToAll( marker.getPacket() );
|
||||
NetworkHandler.instance().sendToAll( marker.getPacket() );
|
||||
}
|
||||
else if( pos.typeOfHit == RayTraceResult.Type.BLOCK )
|
||||
{
|
||||
@@ -401,7 +401,7 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
|
||||
}
|
||||
else if( pos.typeOfHit == RayTraceResult.Type.BLOCK )
|
||||
{
|
||||
if( !AEConfig.instance.isFeatureEnabled( AEFeature.MassCannonBlockDamage ) )
|
||||
if( !AEConfig.instance().isFeatureEnabled( AEFeature.MASS_CANNON_BLOCK_DAMAGE ) )
|
||||
{
|
||||
penetration = 0;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell,
|
||||
{
|
||||
public ToolPortableCell()
|
||||
{
|
||||
super( AEConfig.instance.portableCellBattery );
|
||||
super( AEConfig.instance().getPortableCellBattery() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -52,7 +52,7 @@ public class ToolWirelessTerminal extends AEBasePoweredItem implements IWireless
|
||||
|
||||
public ToolWirelessTerminal()
|
||||
{
|
||||
super( AEConfig.instance.wirelessTerminalBattery );
|
||||
super( AEConfig.instance().getWirelessTerminalBattery() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user