Examples of Cuboid6


Examples of codechicken.lib.vec.Cuboid6

        super(1);
    }

    @Override
    public Cuboid6 getBounds() {
        return new Cuboid6(0.3, 0.3, 0.3, 0.7, 0.7, 0.7);
    }
View Full Code Here

Examples of codechicken.lib.vec.Cuboid6

        super();
    }

    @Override
    public Cuboid6 getBounds() {
        return new Cuboid6(0.375, 0, 0.375, 0.625, 0.5, 0.625);
    }
View Full Code Here

Examples of codechicken.lib.vec.Cuboid6

    {
        int m = meta & 7;
        double d = 0.1875;

        if (m == 1)
            return new Cuboid6(0, 0.2, 0.5 - d, d * 2, 0.8, 0.5 + d);
        if (m == 2)
            return new Cuboid6(1 - d * 2, 0.2, 0.5 - d, 1, 0.8, 0.5 + d);
        if (m == 3)
            return new Cuboid6(0.5 - d, 0.2, 0, 0.5 + d, 0.8, d * 2);
        if (m == 4)
            return new Cuboid6(0.5 - d, 0.2, 1 - d * 2, 0.5 + d, 0.8, 1);

        d = 0.25;
        if (m == 0 || m == 7)
            return new Cuboid6(0.5 - d, 0.4, 0.5 - d, 0.5 + d, 1, 0.5 + d);
       
        return new Cuboid6(0.5 - d, 0, 0.5 - d, 0.5 + d, 0.6, 0.5 + d);
    }
View Full Code Here

Examples of codechicken.lib.vec.Cuboid6

    {
        int m = meta & 7;
        double d = pressed() ? 0.0625 : 0.125;
       
        if (m == 1)
            return new Cuboid6(0.0, 0.375, 0.5 - 0.1875, d, 0.625, 0.5 + 0.1875);
        if (m == 2)
            return new Cuboid6(1.0 - d, 0.375, 0.5 - 0.1875, 1.0, 0.625, 0.5 + 0.1875);
        if (m == 3)
            return new Cuboid6(0.5 - 0.1875, 0.375, 0.0, 0.5 + 0.1875, 0.625, d);
        if (m == 4)
            return new Cuboid6(0.5 - 0.1875, 0.375, 1.0 - d, 0.5 + 0.1875, 0.625, 1.0);
       
        return null;//falloff
    }
View Full Code Here

Examples of codechicken.lib.vec.Cuboid6

   
    public Cuboid6 getBounds(int meta)
    {
        double d = 0.15;
        if (meta == 1)
            return new Cuboid6(0, 0.2, 0.5 - d, d * 2, 0.8, 0.5 + d);
        if (meta == 2)
            return new Cuboid6(1 - d * 2, 0.2, 0.5 - d, 1, 0.8, 0.5 + d);
        if (meta == 3)
            return new Cuboid6(0.5 - d, 0.2, 0, 0.5 + d, 0.8, d * 2);
        if (meta == 4)
            return new Cuboid6(0.5 - d, 0.2, 1 - d * 2, 0.5 + d, 0.8, 1);
       
        d = 0.1;
        return new Cuboid6(0.5 - d, 0, 0.5 - d, 0.5 + d, 0.6, 0.5 + d);
    }
View Full Code Here

Examples of codechicken.lib.vec.Cuboid6

        b.setBounds( minX, minY, minZ, maxX, maxY, maxZ );
      }
    }

    if ( b == null )
      return new Cuboid6( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 );

    return new Cuboid6( b.minX, b.minY, b.minZ, b.maxX, b.maxY, b.maxZ );
  }
View Full Code Here

Examples of codechicken.lib.vec.Cuboid6

        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

Examples of codechicken.lib.vec.Cuboid6

  public Iterable<Cuboid6> getCollisionBoxes()
  {
    LinkedList<Cuboid6> l = new LinkedList<Cuboid6>();
    for (AxisAlignedBB b : cb.getSelectedBoundingBoxesFromPool( false, true, null, false ))
    {
      l.add( new Cuboid6( b.minX, b.minY, b.minZ, b.maxX, b.maxY, b.maxZ ) );
    }
    return l;

  }
View Full Code Here

Examples of codechicken.lib.vec.Cuboid6

  public Iterable<Cuboid6> getOcclusionBoxes()
  {
    LinkedList<Cuboid6> l = new LinkedList<Cuboid6>();
    for (AxisAlignedBB b : cb.getSelectedBoundingBoxesFromPool( true, disableFacadeOcclusion.get() == null, null, true ))
    {
      l.add( new Cuboid6( b.minX, b.minY, b.minZ, b.maxX, b.maxY, b.maxZ ) );
    }
    return l;
  }
View Full Code Here

Examples of codechicken.lib.vec.Cuboid6

  {
    ForgeDirection up = ForgeDirection.getOrientation( meta );
    double xOff = -0.3 * up.offsetX;
    double yOff = -0.3 * up.offsetY;
    double zOff = -0.3 * up.offsetZ;
    return new Cuboid6( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.