Package net.minecraft.world.phys.shapes
Class VoxelShape
java.lang.Object
net.minecraft.world.phys.shapes.VoxelShape
- Direct Known Subclasses:
ArrayVoxelShape
,CubeVoxelShape
,SliceShape
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbounds()
private VoxelShape
calculateFace
(Direction pSide) closestPointTo
(Vec3 pPoint) double
collide
(Direction.Axis pMovementAxis, AABB pCollisionBox, double pDesiredOffset) protected double
protected int
findIndex
(Direction.Axis pAxis, double pPosition) void
forAllBoxes
(Shapes.DoubleLineConsumer pAction) void
forAllEdges
(Shapes.DoubleLineConsumer pAction) protected double
get
(Direction.Axis pAxis, int pIndex) abstract it.unimi.dsi.fastutil.doubles.DoubleList
getCoords
(Direction.Axis p_83249_) getFaceShape
(Direction pSide) Projects this shape onto the given side.boolean
isEmpty()
double
max
(Direction.Axis pAxis) double
max
(Direction.Axis pAxis, double pPrimaryPosition, double pSecondaryPosition) double
min
(Direction.Axis pAxis) double
min
(Direction.Axis pAxis, double pPrimaryPosition, double pSecondaryPosition) move
(double pXOffset, double pYOffset, double pZOffset) optimize()
toAabbs()
toString()
-
Field Details
-
shape
-
faces
-
-
Constructor Details
-
VoxelShape
-
-
Method Details
-
min
-
max
-
bounds
-
singleEncompassing
-
get
-
getCoords
-
isEmpty
public boolean isEmpty() -
move
-
optimize
-
forAllEdges
-
forAllBoxes
-
toAabbs
-
min
-
max
-
findIndex
-
clip
-
closestPointTo
-
getFaceShape
Projects this shape onto the given side. For each box in the shape, if it does not touch the given side, it is eliminated. Otherwise, the box is extended in the given axis to cover the entire range [0, 1]. -
calculateFace
-
collide
-
collideX
-
toString
-