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 VoxelShapecalculateFace(Direction side) closestPointTo(Vec3 point) doublecollide(Direction.Axis movementAxis, AABB collisionBox, double desiredOffset) protected doubleprotected intfindIndex(Direction.Axis axis, double position) voidforAllBoxes(Shapes.DoubleLineConsumer action) voidforAllEdges(Shapes.DoubleLineConsumer action) protected doubleget(Direction.Axis axis, int index) abstract it.unimi.dsi.fastutil.doubles.DoubleListgetCoords(Direction.Axis axis) getFaceShape(Direction side) Projects this shape onto the given side.booleanisEmpty()doublemax(Direction.Axis axis) doublemax(Direction.Axis axis, double primaryPosition, double secondaryPosition) doublemin(Direction.Axis axis) doublemin(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
-