Package appeng.parts

Examples of appeng.parts.BusCollisionHelper


    if ( fp != null )
    {
      if ( !(side == null || side == ForgeDirection.UNKNOWN || tile() == null) )
      {
        List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();
        IPartCollisionHelper bch = new BusCollisionHelper( boxes, side, null, true );
        fp.getBoxes( bch, null );
        for (AxisAlignedBB bb : boxes)
        {
          disableFacadeOcclusion.set( true );
          boolean canAdd = tile().canAddPart( new NormallyOccludedPart( new Cuboid6( bb ) ) );
          disableFacadeOcclusion.remove();
          if ( !canAdd )
          {
            return false;
          }
        }
      }
      return true;
    }

    if ( is.getItem() instanceof IPartItem )
    {
      IPartItem bi = (IPartItem) is.getItem();

      is = is.copy();
      is.stackSize = 1;

      IPart bp = bi.createPartFromItemStack( is );
      if ( !(side == null || side == ForgeDirection.UNKNOWN || tile() == null) )
      {
        List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();
        IPartCollisionHelper bch = new BusCollisionHelper( boxes, side, null, true );
        bp.getBoxes( bch );
        for (AxisAlignedBB bb : boxes)
        {
          if ( !tile().canAddPart( new NormallyOccludedPart( new Cuboid6( bb ) ) ) )
          {
View Full Code Here


    ForgeDirection dir = ForgeDirection.getOrientation( side );
    if ( cable != null && cable.isConnected( dir ) )
    {
      List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();

      BusCollisionHelper bch = new BusCollisionHelper( boxes, ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH, null, true );

      for (ForgeDirection whichSide : ForgeDirection.values())
      {
        IPart fPart = getPart( whichSide );
View Full Code Here

        IPart part = cableBusContainer.getPart( s );
        if ( part != null )
        {
          setSide( s );
          BusRenderHelper brh = BusRenderHelper.instance;
          BusCollisionHelper bch = new BusCollisionHelper( boxes, brh.getWorldX(), brh.getWorldY(), brh.getWorldZ(), null, true );
          part.getBoxes( bch );
        }
      }

      boolean useThinFacades = false;
View Full Code Here

TOP

Related Classes of appeng.parts.BusCollisionHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.