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 side) closestPointTo
(Vec3 point) double
collide
(Direction.Axis movementAxis, AABB collisionBox, double desiredOffset) protected double
protected int
findIndex
(Direction.Axis axis, double position) void
forAllBoxes
(Shapes.DoubleLineConsumer action) void
forAllEdges
(Shapes.DoubleLineConsumer action) protected double
get
(Direction.Axis axis, int index) abstract it.unimi.dsi.fastutil.doubles.DoubleList
getCoords
(Direction.Axis axis) getFaceShape
(Direction side) Projects this shape onto the given side.boolean
isEmpty()
double
max
(Direction.Axis axis) double
max
(Direction.Axis axis, double primaryPosition, double secondaryPosition) double
min
(Direction.Axis axis) double
min
(Direction.Axis axis, double primaryPosition, double secondaryPosition) move
(double xOffset, double yOffset, double zOffset) 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
-