Package net.minecraft.src
Class AxisAlignedBB
java.lang.Object
api.util.PrimitiveGeometric
net.minecraft.src.AxisAlignedBB
- Direct Known Subclasses:
PrimitiveAABBWithBenefits
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAxisAlignedBB(double par1, double par3, double par5, double par7, double par9, double par11) -
Method Summary
Modifier and TypeMethodDescriptionaddCoord(double par1, double par3, double par5) Adds the coordinates to the bounding box extending it if the point lies outside the current ranges.voidaddIntersectingBoxesToCollisionList(World world, int i, int j, int k, AxisAlignedBB boxToIntersect, List collisionList) voidaddToListIfIntersects(AxisAlignedBB intersectingBox, List list) voidaddToRayTrace(RayTraceUtils rayTrace) calculateIntercept(Vec3 par1Vec3, Vec3 par2Vec3) doublecalculateXOffset(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.doublecalculateYOffset(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.doublecalculateZOffset(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.contract(double par1, double par3, double par5) Returns a bounding box that is inset by the specified amountscopy()Returns a copy of the bounding box.expand(double par1, double par3, double par5) Returns a bounding box expanded by the specified vector (if negative numbers are given it will shrink).voidfunc_111270_a(AxisAlignedBB par1AxisAlignedBB) static AABBPoolGets the ThreadLocal AABBPooldoubleReturns the average length of the edges of the bounding box.static AxisAlignedBBgetBoundingBox(double par0, double par2, double par4, double par6, double par8, double par10) Returns a bounding box with the specified bounds.getOffsetBoundingBox(double par1, double par3, double par5) Returns a bounding box offseted by the specified vector (if negative numbers are given it will shrink).booleanintersectsWith(AxisAlignedBB par1AxisAlignedBB) Returns whether the given bounding box intersects with this one.booleanisVecInside(Vec3 par1Vec3) Returns if the supplied Vec3D is completely inside the bounding boxoffset(double par1, double par3, double par5) Offsets the current bounding box by the specified coordinates.booleanrenderAsBlock(RenderBlocks renderBlocks, Block block, int i, int j, int k) booleanrenderAsBlockFullBrightWithTexture(RenderBlocks renderBlocks, Block block, int i, int j, int k, Icon icon) booleanrenderAsBlockWithColorMultiplier(RenderBlocks renderBlocks, Block block, int i, int j, int k, float fRed, float fGreen, float fBlue) booleanrenderAsBlockWithTexture(RenderBlocks renderBlocks, Block block, int i, int j, int k, Icon icon) voidrenderAsFallingBlock(RenderBlocks renderBlocks, Block block, int i, int j, int k, int iMetadata) voidrenderAsItemBlock(RenderBlocks renderBlocks, Block block, int iItemDamage) voidrotateAroundYToFacing(int iFacing) Yaws the box around the J axis.voidsetBB(AxisAlignedBB par1AxisAlignedBB) Sets the bounding box to the same bounds as the bounding box passed in.setBounds(double par1, double par3, double par5, double par7, double par9, double par11) Sets the bounds of the bounding box.voidtiltToFacingAlongY(int iFacing) "Tilts" the box towards the desired facing.toString()voidtranslate(double dDeltaX, double dDeltaY, double dDeltaZ) Methods inherited from class api.util.PrimitiveGeometric
getAssemblyID, renderAsBlockWithColorMultiplier
-
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
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
Adds the coordinates to the bounding box extending it if the point lies outside the current ranges. Args: x, y, z -
expand
Returns a bounding box expanded by the specified vector (if negative numbers are given it will shrink). Args: x, y, z -
func_111270_a
-
getOffsetBoundingBox
Returns a bounding box offseted by the specified vector (if negative numbers are given it will shrink). Args: x, y, z -
calculateXOffset
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
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
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
Returns whether the given bounding box intersects with this one. Args: axisAlignedBB -
offset
Offsets the current bounding box by the specified coordinates. Args: x, y, z -
isVecInside
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
Returns a bounding box that is inset by the specified amounts -
copy
Returns a copy of the bounding box. -
calculateIntercept
-
setBB
Sets the bounding box to the same bounds as the bounding box passed in. Args: axisAlignedBB -
toString
-
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:
rotateAroundYToFacingin classPrimitiveGeometric
-
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:
tiltToFacingAlongYin classPrimitiveGeometric
-
translate
public void translate(double dDeltaX, double dDeltaY, double dDeltaZ) - Specified by:
translatein classPrimitiveGeometric
-
addToRayTrace
- Specified by:
addToRayTracein classPrimitiveGeometric
-
makeTemporaryCopy
- Specified by:
makeTemporaryCopyin classPrimitiveGeometric
-
addIntersectingBoxesToCollisionList
public void addIntersectingBoxesToCollisionList(World world, int i, int j, int k, AxisAlignedBB boxToIntersect, List collisionList) - Overrides:
addIntersectingBoxesToCollisionListin classPrimitiveGeometric
-
expandToInclude
-
addToListIfIntersects
-
renderAsBlock
@Environment(CLIENT) public boolean renderAsBlock(RenderBlocks renderBlocks, Block block, int i, int j, int k) - Specified by:
renderAsBlockin classPrimitiveGeometric
-
renderAsBlockWithColorMultiplier
@Environment(CLIENT) public boolean renderAsBlockWithColorMultiplier(RenderBlocks renderBlocks, Block block, int i, int j, int k, float fRed, float fGreen, float fBlue) - Specified by:
renderAsBlockWithColorMultiplierin classPrimitiveGeometric
-
renderAsBlockWithTexture
@Environment(CLIENT) public boolean renderAsBlockWithTexture(RenderBlocks renderBlocks, Block block, int i, int j, int k, Icon icon) - Specified by:
renderAsBlockWithTexturein classPrimitiveGeometric
-
renderAsBlockFullBrightWithTexture
@Environment(CLIENT) public boolean renderAsBlockFullBrightWithTexture(RenderBlocks renderBlocks, Block block, int i, int j, int k, Icon icon) - Specified by:
renderAsBlockFullBrightWithTexturein classPrimitiveGeometric
-
renderAsItemBlock
@Environment(CLIENT) public void renderAsItemBlock(RenderBlocks renderBlocks, Block block, int iItemDamage) - Specified by:
renderAsItemBlockin classPrimitiveGeometric
-
renderAsFallingBlock
@Environment(CLIENT) public void renderAsFallingBlock(RenderBlocks renderBlocks, Block block, int i, int j, int k, int iMetadata) - Specified by:
renderAsFallingBlockin classPrimitiveGeometric
-