IGridNode sn = sbp.getGridNode();
if ( sn != null )
{
try
{
new GridConnection( cn, sn, ForgeDirection.UNKNOWN );
}
catch (FailedConnection e)
{
// ekk!
bp.removeFromWorld();
setCenter( null );
return null;
}
}
}
}
}
updateConnections();
markForUpdate();
markForSave();
partChanged();
return ForgeDirection.UNKNOWN;
}
else if ( bp != null && !(bp instanceof IPartCable) && side != ForgeDirection.UNKNOWN )
{
IPart cable = getPart( ForgeDirection.UNKNOWN );
if ( cable != null && !bp.canBePlacedOn( ((IPartCable) cable).supportsBuses() ) )
return null;
setSide( side, bp );
bp.setPartHostInfo( side, this, this.getTile() );
if ( player != null )
bp.onPlacement( player, is, side );
if ( inWorld )
bp.addToWorld();
if ( getCenter() != null )
{
IGridNode cn = getCenter().getGridNode();
IGridNode sn = bp.getGridNode();
if ( cn != null && sn != null )
{
try
{
new GridConnection( cn, sn, ForgeDirection.UNKNOWN );
}
catch (FailedConnection e)
{
// ekk!