Refactors grid connections (#3219)
Extracted all checks and subsequent updates to a factory method from the constructor. Reordered checks to check for nulls before anything else. Also existing connections before security breaks. Fixes TileController#checkController() using the wrong position. Added debug logging for failed connections. Improved logging. Inversed boolean so false no longer means security check passed. Only issue a security break on SecurityConnectionException.
This commit is contained in:
@@ -241,11 +241,11 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
{
|
||||
try
|
||||
{
|
||||
new GridConnection( cn, sn, AEPartLocation.INTERNAL );
|
||||
GridConnection.create( cn, sn, AEPartLocation.INTERNAL );
|
||||
}
|
||||
catch( final FailedConnectionException e )
|
||||
{
|
||||
// ekk!
|
||||
AELog.debug( e );
|
||||
|
||||
bp.removeFromWorld();
|
||||
this.setCenter( null );
|
||||
@@ -292,11 +292,11 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
{
|
||||
try
|
||||
{
|
||||
new GridConnection( cn, sn, AEPartLocation.INTERNAL );
|
||||
GridConnection.create( cn, sn, AEPartLocation.INTERNAL );
|
||||
}
|
||||
catch( final FailedConnectionException e )
|
||||
{
|
||||
// ekk!
|
||||
AELog.debug( e );
|
||||
|
||||
bp.removeFromWorld();
|
||||
this.setSide( side, null );
|
||||
@@ -637,6 +637,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
catch( final FailedConnectionException e )
|
||||
{
|
||||
// ekk
|
||||
AELog.debug( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user