Class AxisAlignedBB

java.lang.Object
api.util.PrimitiveGeometric
net.minecraft.src.AxisAlignedBB
Direct Known Subclasses:
PrimitiveAABBWithBenefits

public class AxisAlignedBB extends PrimitiveGeometric
  • Field Details

    • minX

      public double minX
    • minY

      public double minY
    • minZ

      public double minZ
    • maxX

      public double maxX
    • maxY

      public double maxY
    • maxZ

      public double maxZ
  • Constructor Details

    • AxisAlignedBB

      public AxisAlignedBB(double par1, double par3, double par5, double par7, double par9, double par11)
  • Method Details

    • 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
    • func_111270_a

      public AxisAlignedBB func_111270_a(AxisAlignedBB par1AxisAlignedBB)
    • 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
    • rotateAroundYToFacing

      public void rotateAroundYToFacing(int iFacing)
      Yaws the box around the J axis. Assumes that the box's initial facing is along the negative K axis (facing 2)
      Specified by:
      rotateAroundYToFacing in class PrimitiveGeometric
    • tiltToFacingAlongY

      public void tiltToFacingAlongY(int iFacing)
      "Tilts" the box towards the desired facing. Takes the up vector and either yaws or rolls it towards the specified axis.
      Specified by:
      tiltToFacingAlongY in class PrimitiveGeometric
    • translate

      public void translate(double dDeltaX, double dDeltaY, double dDeltaZ)
      Specified by:
      translate in class PrimitiveGeometric
    • addToRayTrace

      public void addToRayTrace(RayTraceUtils rayTrace)
      Specified by:
      addToRayTrace in class PrimitiveGeometric
    • makeTemporaryCopy

      public AxisAlignedBB makeTemporaryCopy()
      Specified by:
      makeTemporaryCopy in class PrimitiveGeometric
    • addIntersectingBoxesToCollisionList

      public void addIntersectingBoxesToCollisionList(World world, int i, int j, int k, AxisAlignedBB boxToIntersect, List collisionList)
      Overrides:
      addIntersectingBoxesToCollisionList in class PrimitiveGeometric
    • expandToInclude

      public void expandToInclude(AxisAlignedBB box)
    • addToListIfIntersects

      public void addToListIfIntersects(AxisAlignedBB intersectingBox, List list)
    • renderAsBlock

      @Environment(CLIENT) public boolean renderAsBlock(RenderBlocks renderBlocks, Block block, int i, int j, int k)
      Specified by:
      renderAsBlock in class PrimitiveGeometric
    • renderAsBlockWithColorMultiplier

      @Environment(CLIENT) public boolean renderAsBlockWithColorMultiplier(RenderBlocks renderBlocks, Block block, int i, int j, int k, float fRed, float fGreen, float fBlue)
      Specified by:
      renderAsBlockWithColorMultiplier in class PrimitiveGeometric
    • renderAsBlockWithTexture

      @Environment(CLIENT) public boolean renderAsBlockWithTexture(RenderBlocks renderBlocks, Block block, int i, int j, int k, Icon icon)
      Specified by:
      renderAsBlockWithTexture in class PrimitiveGeometric
    • renderAsBlockFullBrightWithTexture

      @Environment(CLIENT) public boolean renderAsBlockFullBrightWithTexture(RenderBlocks renderBlocks, Block block, int i, int j, int k, Icon icon)
      Specified by:
      renderAsBlockFullBrightWithTexture in class PrimitiveGeometric
    • renderAsItemBlock

      @Environment(CLIENT) public void renderAsItemBlock(RenderBlocks renderBlocks, Block block, int iItemDamage)
      Specified by:
      renderAsItemBlock in class PrimitiveGeometric
    • renderAsFallingBlock

      @Environment(CLIENT) public void renderAsFallingBlock(RenderBlocks renderBlocks, Block block, int i, int j, int k, int iMetadata)
      Specified by:
      renderAsFallingBlock in class PrimitiveGeometric