@Override
public SelectedPart selectPart(Vec3 pos)
{
for (ForgeDirection side : ForgeDirection.values())
{
IPart p = getPart( side );
if ( p != null )
{
List<AxisAlignedBB> boxes = new LinkedList<AxisAlignedBB>();
IPartCollisionHelper bch = new BusCollisionHelper( boxes, side, null, true );
p.getBoxes( bch );
for (AxisAlignedBB bb : boxes)
{
bb = bb.expand( 0.002, 0.002, 0.002 );
if ( bb.isVecInside( pos ) )
{
return new SelectedPart( p, side );
}
}
}
}
if ( AEApi.instance().partHelper().getCableRenderMode().opaqueFacades )
{
IFacadeContainer fc = getFacadeContainer();
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
{
IFacadePart p = fc.getFacade( side );
if ( p != null )
{
List<AxisAlignedBB> boxes = new LinkedList<AxisAlignedBB>();
IPartCollisionHelper bch = new BusCollisionHelper( boxes, side, null, true );
p.getBoxes( bch, null );
for (AxisAlignedBB bb : boxes)
{
bb = bb.expand( 0.01, 0.01, 0.01 );
if ( bb.isVecInside( pos ) )
{