Class VoxelShape
java.lang.Object
net.minecraft.world.phys.shapes.VoxelShape
- Direct Known Subclasses:
ArrayVoxelShape, CubeVoxelShape, SliceShape
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable VoxelShape @Nullable []protected final DiscreteVoxelShape -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbounds()private VoxelShapecalculateFace(Direction direction) @Nullable BlockHitResultclosestPointTo(Vec3 point) doublecollide(Direction.Axis axis, AABB moving, double distance) protected doublebooleanprotected intfindIndex(Direction.Axis axis, double coord) voidforAllBoxes(Shapes.DoubleLineConsumer consumer) voidforAllEdges(Shapes.DoubleLineConsumer consumer) protected doubleget(Direction.Axis axis, int i) abstract it.unimi.dsi.fastutil.doubles.DoubleListgetCoords(Direction.Axis axis) getFaceShape(Direction direction) Projects this shape onto the given side.protected booleanprivate booleanbooleanisEmpty()doublemax(Direction.Axis axis) doublemax(Direction.Axis aAxis, double b, double c) doublemin(Direction.Axis axis) doublemin(Direction.Axis aAxis, double b, double c) move(double dx, double dy, double dz) optimize()toAabbs()toString()
-
Field Details
-
shape
-
faces
-
-
Constructor Details
-
VoxelShape
-
-
Method Details
-
min
-
max
-
bounds
-
singleEncompassing
-
get
-
getCoords
-
isEmpty
public boolean isEmpty() -
move
-
move
-
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
-
isCubeLike
protected boolean isCubeLike() -
isCubeLikeAlong
-
collide
-
collideX
-
equals
-
toString
-