Package codechicken.multipart

Examples of codechicken.multipart.NormallyOccludedPart


        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 ) ) ) )
          {
            return false;
          }
        }
      }
View Full Code Here


  {
    if ( side == null || side == ForgeDirection.UNKNOWN || tile() == null )
      return false;

    disableFacadeOcclusion.set( true );
    boolean blocked = !tile().canAddPart( new NormallyOccludedPart( sideTests[side.ordinal()] ) );
    disableFacadeOcclusion.remove();

    return blocked;
  }
View Full Code Here

        //if(getBlockMetadata() > 0 && getBlockMetadata() != BlockPressureTube.AIR_GRATE_TUBE_META) {
        //   return sidesConnected[side.ordinal()];
        // } else {
        boolean[] tempConnections = sidesConnected;
        sidesConnected = new boolean[6];
        boolean canConnect = tile() != null && tile().canAddPart(new NormallyOccludedPart(boundingBoxes[side.ordinal()]));
        sidesConnected = tempConnections;
        return canConnect;
        // }
    }
View Full Code Here

TOP

Related Classes of codechicken.multipart.NormallyOccludedPart

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.