net.minecraft.util

## Class AxisAlignedBB

- java.lang.Object
- - net.minecraft.util.AxisAlignedBB

-     public class AxisAlignedBB
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `double` | `maxX`
    `double` | `maxY`
    `double` | `maxZ`
    `double` | `minX`
    `double` | `minY`
    `double` | `minZ`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AxisAlignedBB` | `addCoord(double par1, double par3, double par5)` Adds the coordinates to the bounding box extending it if the point lies outside the current ranges.
    `MovingObjectPosition` | `calculateIntercept(Vec3 par1Vec3, Vec3 par2Vec3)`
    `double` | `calculateXOffset(AxisAlignedBB par1AxisAlignedBB, double par2)` if instance and the argument bounding boxes overlap in the Y and Z dimensions, calculate the offset between them in the X dimension.
    `double` | `calculateYOffset(AxisAlignedBB par1AxisAlignedBB, double par2)` if instance and the argument bounding boxes overlap in the X and Z dimensions, calculate the offset between them in the Y dimension.
    `double` | `calculateZOffset(AxisAlignedBB par1AxisAlignedBB, double par2)` if instance and the argument bounding boxes overlap in the Y and X dimensions, calculate the offset between them in the Z dimension.
    `AxisAlignedBB` | `contract(double par1, double par3, double par5)` Returns a bounding box that is inset by the specified amounts
    `AxisAlignedBB` | `copy()` Returns a copy of the bounding box.
    `AxisAlignedBB` | `expand(double par1, double par3, double par5)` Returns a bounding box expanded by the specified vector (if negative numbers are given it will shrink).
    `static AABBPool` | `getAABBPool()` Gets the ThreadLocal AABBPool
    `double` | `getAverageEdgeLength()` Returns the average length of the edges of the bounding box.
    `static AxisAlignedBB` | `getBoundingBox(double par0, double par2, double par4, double par6, double par8, double par10)` Returns a bounding box with the specified bounds.
    `AxisAlignedBB` | `getOffsetBoundingBox(double par1, double par3, double par5)` Returns a bounding box offseted by the specified vector (if negative numbers are given it will shrink).
    `boolean` | `intersectsWith(AxisAlignedBB par1AxisAlignedBB)` Returns whether the given bounding box intersects with this one.
    `boolean` | `isVecInside(Vec3 par1Vec3)` Returns if the supplied Vec3D is completely inside the bounding box
    `AxisAlignedBB` | `offset(double par1, double par3, double par5)` Offsets the current bounding box by the specified coordinates.
    `void` | `setBB(AxisAlignedBB par1AxisAlignedBB)` Sets the bounding box to the same bounds as the bounding box passed in.
    `AxisAlignedBB` | `setBounds(double par1, double par3, double par5, double par7, double par9, double par11)` Sets the bounds of the bounding box.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### minX

          public double minX

    - #### minY

          public double minY

    - #### minZ

          public double minZ

    - #### maxX

          public double maxX

    - #### maxY

          public double maxY

    - #### maxZ

          public double maxZ

  - ### Method Detail

    - #### getBoundingBox

          public static AxisAlignedBB getBoundingBox(double par0,
                                     double par2,
                                     double par4,
                                     double par6,
                                     double par8,
                                     double par10)

      Returns a bounding box with the specified bounds. Args: minX, minY, minZ, maxX, maxY, maxZ

    - #### getAABBPool

          public static AABBPool getAABBPool()

      Gets the ThreadLocal AABBPool

    - #### setBounds

          public AxisAlignedBB setBounds(double par1,
                                double par3,
                                double par5,
                                double par7,
                                double par9,
                                double par11)

      Sets the bounds of the bounding box. Args: minX, minY, minZ, maxX, maxY, maxZ

    - #### addCoord

          public AxisAlignedBB addCoord(double par1,
                               double par3,
                               double par5)

      Adds the coordinates to the bounding box extending it if the point lies outside the current ranges. Args: x, y, z

    - #### expand

          public AxisAlignedBB expand(double par1,
                             double par3,
                             double par5)

      Returns a bounding box expanded by the specified vector (if negative numbers are given it will shrink). Args: x, y, z

    - #### getOffsetBoundingBox

          public AxisAlignedBB getOffsetBoundingBox(double par1,
                                           double par3,
                                           double par5)

      Returns a bounding box offseted by the specified vector (if negative numbers are given it will shrink). Args: x, y, z

    - #### calculateXOffset

          public double calculateXOffset(AxisAlignedBB par1AxisAlignedBB,
                                double par2)

      if instance and the argument bounding boxes overlap in the Y and Z dimensions, calculate the offset between them in the X dimension. return var2 if the bounding boxes do not overlap or if var2 is closer to 0 then the calculated offset. Otherwise return the calculated offset.

    - #### calculateYOffset

          public double calculateYOffset(AxisAlignedBB par1AxisAlignedBB,
                                double par2)

      if instance and the argument bounding boxes overlap in the X and Z dimensions, calculate the offset between them in the Y dimension. return var2 if the bounding boxes do not overlap or if var2 is closer to 0 then the calculated offset. Otherwise return the calculated offset.

    - #### calculateZOffset

          public double calculateZOffset(AxisAlignedBB par1AxisAlignedBB,
                                double par2)

      if instance and the argument bounding boxes overlap in the Y and X dimensions, calculate the offset between them in the Z dimension. return var2 if the bounding boxes do not overlap or if var2 is closer to 0 then the calculated offset. Otherwise return the calculated offset.

    - #### intersectsWith

          public boolean intersectsWith(AxisAlignedBB par1AxisAlignedBB)

      Returns whether the given bounding box intersects with this one. Args: axisAlignedBB

    - #### offset

          public AxisAlignedBB offset(double par1,
                             double par3,
                             double par5)

      Offsets the current bounding box by the specified coordinates. Args: x, y, z

    - #### isVecInside

          public boolean isVecInside(Vec3 par1Vec3)

      Returns if the supplied Vec3D is completely inside the bounding box

    - #### getAverageEdgeLength

          public double getAverageEdgeLength()

      Returns the average length of the edges of the bounding box.

    - #### contract

          public AxisAlignedBB contract(double par1,
                               double par3,
                               double par5)

      Returns a bounding box that is inset by the specified amounts

    - #### copy

          public AxisAlignedBB copy()

      Returns a copy of the bounding box.

    - #### calculateIntercept

          public MovingObjectPosition calculateIntercept(Vec3 par1Vec3,
                                                Vec3 par2Vec3)

    - #### setBB

          public void setBB(AxisAlignedBB par1AxisAlignedBB)

      Sets the bounding box to the same bounds as the bounding box passed in. Args: axisAlignedBB

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`