Package appeng.api.parts

Examples of appeng.api.parts.IFacadeContainer


  public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(boolean ignoreCableConnections, boolean includeFacades, Entity e, boolean visual)
  {
    List<AxisAlignedBB> boxes = new LinkedList<AxisAlignedBB>();

    IFacadeContainer fc = getFacadeContainer();
    for (ForgeDirection s : ForgeDirection.values())
    {
      IPartCollisionHelper bch = new BusCollisionHelper( boxes, s, e, visual );

      IPart part = getPart( s );
      if ( part != null )
      {
        if ( ignoreCableConnections && part instanceof IPartCable )
          bch.addBox( 6.0, 6.0, 6.0, 10.0, 10.0, 10.0 );
        else
          part.getBoxes( bch );
      }

      if ( AEApi.instance().partHelper().getCableRenderMode().opaqueFacades || !visual )
      {
        if ( includeFacades && s != null && s != ForgeDirection.UNKNOWN )
        {
          IFacadePart fp = fc.getFacade( s );
          if ( fp != null )
            fp.getBoxes( bch, e );
        }
      }
    }
View Full Code Here


  }

  @Override
  public boolean isEmpty()
  {
    IFacadeContainer fc = getFacadeContainer();
    for (ForgeDirection s : ForgeDirection.values())
    {
      IPart part = getPart( s );
      if ( part != null )
        return false;

      if ( s != ForgeDirection.UNKNOWN )
      {
        IFacadePart fp = fc.getFacade( s );
        if ( fp != null )
          return false;
      }
    }
    return true;
View Full Code Here

  public void writeToNBT(NBTTagCompound data)
  {
    data.setInteger( "hasRedstone", hasRedstone.ordinal() );

    IFacadeContainer fc = getFacadeContainer();
    for (ForgeDirection s : ForgeDirection.values())
    {
      fc.writeToNBT( data );

      IPart part = getPart( s );
      if ( part != null )
      {
        NBTTagCompound def = new NBTTagCompound();
View Full Code Here

      }
    }

    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 );
View Full Code Here

  {
    if ( getCenter() == null )
    {
      List<ItemStack> facades = new LinkedList<ItemStack>();

      IFacadeContainer fc = getFacadeContainer();
      for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS)
      {
        IFacadePart fp = fc.getFacade( d );
        if ( fp != null )
        {
          facades.add( fp.getItemStack() );
          fc.removeFacade( tcb, d );
        }
      }

      if ( !facades.isEmpty() )
      {
View Full Code Here

TOP

Related Classes of appeng.api.parts.IFacadeContainer

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.