Package net.minecraft.util.math
Class Box
java.lang.Object
net.minecraft.util.math.Box
public class Box extends Object
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description boolean
contains(double x, double y, double z)
boolean
contains(Vec3d vec)
Box
contract(double value)
boolean
equals(Object o)
Box
expand(double value)
Box
expand(double x, double y, double z)
static Box
from(BlockBox mutable)
double
getAverageSideLength()
Vec3d
getCenter()
double
getMax(Direction.Axis axis)
double
getMin(Direction.Axis axis)
double
getXLength()
double
getYLength()
double
getZLength()
int
hashCode()
Box
intersection(Box box)
boolean
intersects(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
boolean
intersects(Box box)
boolean
intersects(Vec3d from, Vec3d to)
boolean
isValid()
static Box
method_29968(Vec3d vec3d)
static Box
method_30048(double double2, double double3, double double4)
Box
offset(double x, double y, double z)
Box
offset(BlockPos blockPos)
Box
offset(Vec3d vec3d)
static BlockHitResult
raycast(Iterable<Box> boxes, Vec3d from, Vec3d to, BlockPos pos)
Optional<Vec3d>
raycast(Vec3d min, Vec3d max)
Box
shrink(double x, double y, double z)
Box
stretch(double x, double y, double z)
Box
stretch(Vec3d scale)
String
toString()
private static Direction
traceCollisionSide(double[] traceDistanceResult, Direction approachDirection, double xDelta, double yDelta, double zDelta, double begin, double minX, double maxX, double minZ, double maxZ, Direction resultDirection, double startX, double startY, double startZ)
private static Direction
traceCollisionSide(Box box, Vec3d intersectingVector, double[] traceDistanceResult, Direction approachDirection, double xDelta, double yDelta, double zDelta)
Box
union(Box box)
-
Field Details
-
minX
public final double minX -
minY
public final double minY -
minZ
public final double minZ -
maxX
public final double maxX -
maxY
public final double maxY -
maxZ
public final double maxZ
-
-
Constructor Details
-
Box
public Box(double x1, double y1, double z1, double x2, double y2, double z2) -
Box
-
Box
-
Box
-
-
Method Details
-
from
-
method_29968
-
getMin
-
getMax
-
equals
-
hashCode
public int hashCode() -
shrink
-
stretch
-
stretch
-
expand
-
expand
-
intersection
-
union
-
offset
-
offset
-
offset
-
intersects
-
intersects
public boolean intersects(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) -
intersects
-
contains
-
contains
public boolean contains(double x, double y, double z) -
getAverageSideLength
public double getAverageSideLength() -
getXLength
public double getXLength() -
getYLength
public double getYLength() -
getZLength
public double getZLength() -
contract
-
raycast
-
raycast
-
traceCollisionSide
-
traceCollisionSide
@Nullable private static Direction traceCollisionSide(double[] traceDistanceResult, @Nullable Direction approachDirection, double xDelta, double yDelta, double zDelta, double begin, double minX, double maxX, double minZ, double maxZ, Direction resultDirection, double startX, double startY, double startZ) -
toString
-
isValid
@Environment(CLIENT) public boolean isValid() -
getCenter
-
method_30048
-