public class AABBUtils
extends java.lang.Object
| Constructor and Description |
|---|
AABBUtils() |
| Modifier and Type | Method and Description |
|---|---|
static net.minecraft.util.math.AxisAlignedBB |
combine(net.minecraft.util.math.AxisAlignedBB[] aabbs)
Gets a
AxisAlignedBB that encompasses the passed AxisAlignedBB. |
static net.minecraft.util.math.AxisAlignedBB |
empty()
Gets an empty
AxisAlignedBB (size 0x0x0) at position 0,0,0. |
static net.minecraft.util.math.AxisAlignedBB |
empty(net.minecraft.util.math.BlockPos pos)
Gets an empty
AxisAlignedBB (size 0x0x0) at the BlockPos position. |
static net.minecraft.util.math.AxisAlignedBB[] |
getCollisionBoundingBoxes(net.minecraft.world.World world,
net.minecraft.block.Block block,
net.minecraft.util.math.BlockPos pos)
Gets the collision
AxisAlignedBB for the Block as the BlockPos coordinates. |
static net.minecraft.util.math.AxisAlignedBB[] |
getCollisionBoundingBoxes(net.minecraft.world.World world,
net.minecraft.block.Block block,
net.minecraft.util.math.BlockPos pos,
boolean offset)
Gets the collision
AxisAlignedBB for the Block as the BlockPos coordinates. |
static net.minecraft.util.math.AxisAlignedBB[] |
getCollisionBoundingBoxes(net.minecraft.world.World world,
MBlockState state)
Gets the collision
AxisAlignedBB for the MBlockState. |
static net.minecraft.util.math.AxisAlignedBB[] |
getCollisionBoundingBoxes(net.minecraft.world.World world,
MBlockState state,
boolean offset)
Gets the collision
AxisAlignedBB for the MBlockState. |
static net.minecraft.util.math.AxisAlignedBB[] |
identities()
Gets an identity
AxisAlignedBB (size 1x1x1) at position 0,0,0 returned as an array. |
static net.minecraft.util.math.AxisAlignedBB[] |
identities(net.minecraft.util.math.BlockPos pos)
Gets an identity
AxisAlignedBB (size 1x1x1) at BlockPos position returned as an array. |
static net.minecraft.util.math.AxisAlignedBB |
identity()
Gets an identity
AxisAlignedBB (size 1x1x1) at position 0,0,0. |
static net.minecraft.util.math.AxisAlignedBB |
identity(net.minecraft.util.math.BlockPos pos)
Gets an identity
AxisAlignedBB (size 1x1x1) at BlockPos position; |
static boolean |
isColliding(net.minecraft.util.math.AxisAlignedBB[] aabbs,
net.minecraft.util.math.AxisAlignedBB aabb)
Checks if an
AxisAlignedBB array is colliding with an AxisAlignedBB. |
static boolean |
isColliding(net.minecraft.util.math.AxisAlignedBB[] aabbs1,
net.minecraft.util.math.AxisAlignedBB[] aabbs2)
Checks if an
AxisAlignedBB array is colliding with another one. |
static boolean |
isColliding(net.minecraft.util.math.AxisAlignedBB aabb,
net.minecraft.util.math.AxisAlignedBB[] aabbs)
Checks if an
AxisAlignedBB is colliding with an AxisAlignedBB array. |
static net.minecraft.util.math.AxisAlignedBB[] |
offset(net.minecraft.util.math.BlockPos pos,
net.minecraft.util.math.AxisAlignedBB... aabbs)
Offsets the passed
AxisAlignedBB array by the BlockPos coordinates. |
static net.minecraft.util.math.AxisAlignedBB |
offset(net.minecraft.util.math.BlockPos pos,
net.minecraft.util.math.AxisAlignedBB aabb)
Offsets the passed
AxisAlignedBB by the BlockPos coordinates. |
static net.minecraft.util.math.AxisAlignedBB[] |
offset(double x,
double y,
double z,
net.minecraft.util.math.AxisAlignedBB... aabbs)
Offsets the passed
AxisAlignedBB array by the specified coordinates. |
static net.minecraft.util.math.AxisAlignedBB |
readFromNBT(net.minecraft.nbt.NBTTagCompound tag)
Reads a
AxisAlignedBB from NBTTagCompound. |
static net.minecraft.util.math.AxisAlignedBB[] |
rotate(net.minecraft.util.math.AxisAlignedBB[] aabbs,
net.minecraft.util.EnumFacing dir)
Rotates an array of
AxisAlignedBB around the Y axis based on the specified direction. |
static net.minecraft.util.math.AxisAlignedBB[] |
rotate(net.minecraft.util.math.AxisAlignedBB[] aabbs,
int angle)
Rotates an array
AxisAlignedBB around the Y axis based on the specified angle. |
static net.minecraft.util.math.AxisAlignedBB |
rotate(net.minecraft.util.math.AxisAlignedBB aabb,
net.minecraft.util.EnumFacing dir)
Rotates the
AxisAlignedBB based on the specified direction. |
static net.minecraft.util.math.AxisAlignedBB |
rotate(net.minecraft.util.math.AxisAlignedBB aabb,
int angle)
Rotates the
AxisAlignedBB around the Y axis based on the specified angle. |
static net.minecraft.util.math.AxisAlignedBB |
rotate(net.minecraft.util.math.AxisAlignedBB aabb,
int angle,
net.minecraft.util.EnumFacing.Axis axis)
Rotates the
AxisAlignedBB around the axis based on the specified angle. |
static net.minecraft.util.math.AxisAlignedBB[] |
slice(int slices,
float[][] fx,
float[][] fy,
float[][] fz,
boolean vertical) |
static void |
writeToNBT(net.minecraft.nbt.NBTTagCompound tag,
net.minecraft.util.math.AxisAlignedBB aabb)
Writes a
AxisAlignedBB to a NBTTagCompound. |
public static net.minecraft.util.math.AxisAlignedBB empty()
AxisAlignedBB (size 0x0x0) at position 0,0,0.public static net.minecraft.util.math.AxisAlignedBB empty(net.minecraft.util.math.BlockPos pos)
AxisAlignedBB (size 0x0x0) at the BlockPos position.pos - the pospublic static net.minecraft.util.math.AxisAlignedBB identity()
AxisAlignedBB (size 1x1x1) at position 0,0,0.public static net.minecraft.util.math.AxisAlignedBB identity(net.minecraft.util.math.BlockPos pos)
AxisAlignedBB (size 1x1x1) at BlockPos position;pos - the pospublic static net.minecraft.util.math.AxisAlignedBB[] identities()
AxisAlignedBB (size 1x1x1) at position 0,0,0 returned as an array.public static net.minecraft.util.math.AxisAlignedBB[] identities(net.minecraft.util.math.BlockPos pos)
AxisAlignedBB (size 1x1x1) at BlockPos position returned as an array.pos - the pospublic static net.minecraft.util.math.AxisAlignedBB rotate(net.minecraft.util.math.AxisAlignedBB aabb,
net.minecraft.util.EnumFacing dir)
AxisAlignedBB based on the specified direction.EnumFacing.SOUTH to be the default non rotated direction.aabb - the aabbdir - the dirpublic static net.minecraft.util.math.AxisAlignedBB[] rotate(net.minecraft.util.math.AxisAlignedBB[] aabbs,
net.minecraft.util.EnumFacing dir)
AxisAlignedBB around the Y axis based on the specified direction.EnumFacing.SOUTH to be the default non rotated direction.aabbs - the aabbsdir - the dirpublic static net.minecraft.util.math.AxisAlignedBB[] rotate(net.minecraft.util.math.AxisAlignedBB[] aabbs,
int angle)
AxisAlignedBB around the Y axis based on the specified angle.aabbs - the aabbsangle - the anglepublic static net.minecraft.util.math.AxisAlignedBB rotate(net.minecraft.util.math.AxisAlignedBB aabb,
int angle)
AxisAlignedBB around the Y axis based on the specified angle.aabb - the aabbangle - the anglepublic static net.minecraft.util.math.AxisAlignedBB rotate(net.minecraft.util.math.AxisAlignedBB aabb,
int angle,
net.minecraft.util.EnumFacing.Axis axis)
AxisAlignedBB around the axis based on the specified angle.aabb - the aabbangle - the angleaxis - the axispublic static net.minecraft.util.math.AxisAlignedBB readFromNBT(net.minecraft.nbt.NBTTagCompound tag)
AxisAlignedBB from NBTTagCompound.tag - the tagpublic static void writeToNBT(net.minecraft.nbt.NBTTagCompound tag,
net.minecraft.util.math.AxisAlignedBB aabb)
AxisAlignedBB to a NBTTagCompound.tag - the tagaabb - the aabbpublic static net.minecraft.util.math.AxisAlignedBB combine(net.minecraft.util.math.AxisAlignedBB[] aabbs)
AxisAlignedBB that encompasses the passed AxisAlignedBB.aabbs - the aabbspublic static net.minecraft.util.math.AxisAlignedBB[] offset(double x,
double y,
double z,
net.minecraft.util.math.AxisAlignedBB... aabbs)
AxisAlignedBB array by the specified coordinates.x - the xy - the yz - the zaabbs - the aabbspublic static net.minecraft.util.math.AxisAlignedBB offset(net.minecraft.util.math.BlockPos pos,
net.minecraft.util.math.AxisAlignedBB aabb)
AxisAlignedBB by the BlockPos coordinates.pos - the posaabb - the aabbpublic static net.minecraft.util.math.AxisAlignedBB[] offset(net.minecraft.util.math.BlockPos pos,
net.minecraft.util.math.AxisAlignedBB... aabbs)
AxisAlignedBB array by the BlockPos coordinates.pos - the posaabbs - the aabbspublic static boolean isColliding(net.minecraft.util.math.AxisAlignedBB aabb,
net.minecraft.util.math.AxisAlignedBB[] aabbs)
AxisAlignedBB is colliding with an AxisAlignedBB array.aabb - the aabbaabbs - the aabbspublic static boolean isColliding(net.minecraft.util.math.AxisAlignedBB[] aabbs,
net.minecraft.util.math.AxisAlignedBB aabb)
AxisAlignedBB array is colliding with an AxisAlignedBB.aabbs - the aabbsaabb - the aabbpublic static boolean isColliding(net.minecraft.util.math.AxisAlignedBB[] aabbs1,
net.minecraft.util.math.AxisAlignedBB[] aabbs2)
AxisAlignedBB array is colliding with another one.aabbs1 - the aabbs1aabbs2 - the aabbs2public static net.minecraft.util.math.AxisAlignedBB[] getCollisionBoundingBoxes(net.minecraft.world.World world,
net.minecraft.block.Block block,
net.minecraft.util.math.BlockPos pos)
AxisAlignedBB for the Block as the BlockPos coordinates.world - the worldblock - the blockpos - the pospublic static net.minecraft.util.math.AxisAlignedBB[] getCollisionBoundingBoxes(net.minecraft.world.World world,
net.minecraft.block.Block block,
net.minecraft.util.math.BlockPos pos,
boolean offset)
AxisAlignedBB for the Block as the BlockPos coordinates.world - the worldblock - the blockpos - the posoffset - if true, the boxes are offset by the coordinatepublic static net.minecraft.util.math.AxisAlignedBB[] getCollisionBoundingBoxes(net.minecraft.world.World world,
MBlockState state)
AxisAlignedBB for the MBlockState.world - the worldstate - the statepublic static net.minecraft.util.math.AxisAlignedBB[] getCollisionBoundingBoxes(net.minecraft.world.World world,
MBlockState state,
boolean offset)
AxisAlignedBB for the MBlockState.world - the worldstate - the stateoffset - the offsetpublic static net.minecraft.util.math.AxisAlignedBB[] slice(int slices,
float[][] fx,
float[][] fy,
float[][] fz,
boolean vertical)