Class Shapes
java.lang.Object
net.minecraft.world.phys.shapes.Shapes
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleprivate static final VoxelShapeprivate static final Vec3private static final VoxelShapestatic final doublestatic final VoxelShape -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic VoxelShapeblock()static booleanblockOccludes(VoxelShape shape, VoxelShape occluder, Direction direction) static VoxelShapebox(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) static doublecollide(Direction.Axis axis, AABB moving, Iterable<VoxelShape> shapes, double distance) static VoxelShapecreate(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) static VoxelShapeprotected static IndexMergercreateIndexMerger(int cost, it.unimi.dsi.fastutil.doubles.DoubleList first, it.unimi.dsi.fastutil.doubles.DoubleList second, boolean firstOnlyMatters, boolean secondOnlyMatters) static VoxelShapeempty()static booleanequal(VoxelShape first, VoxelShape second) static booleanfaceShapeOccludes(VoxelShape shape, VoxelShape occluder) protected static intfindBits(double min, double max) (package private) static it.unimi.dsi.fastutil.doubles.DoubleListflipAxisIfNeeded(it.unimi.dsi.fastutil.doubles.DoubleList newAxis, boolean flip, double newRelative, double oldRelative) static VoxelShapejoin(VoxelShape first, VoxelShape second, BooleanOp op) private static booleanjoinIsNotEmpty(IndexMerger xMerger, IndexMerger yMerger, IndexMerger zMerger, DiscreteVoxelShape first, DiscreteVoxelShape second, BooleanOp op) static booleanjoinIsNotEmpty(VoxelShape first, VoxelShape second, BooleanOp op) static VoxelShapejoinUnoptimized(VoxelShape first, VoxelShape second, BooleanOp op) protected static longlcm(int first, int second) static booleanmergedFaceOccludes(VoxelShape shape, VoxelShape occluder, Direction direction) static VoxelShapeor(VoxelShape first, VoxelShape second) static VoxelShapeor(VoxelShape first, VoxelShape... tail) static VoxelShaperotate(VoxelShape shape, OctahedralGroup rotation) static VoxelShaperotate(VoxelShape shape, OctahedralGroup rotation, Vec3 rotationPoint) static Map<Direction, VoxelShape> rotateAll(VoxelShape north) static Map<Direction, VoxelShape> rotateAll(VoxelShape north, OctahedralGroup initial, Vec3 rotationCenter) static Map<Direction, VoxelShape> rotateAll(VoxelShape north, Vec3 rotationCenter) static Map<Direction.Axis, VoxelShape> rotateAllAxis(VoxelShape north) static Map<Direction.Axis, VoxelShape> rotateAllAxis(VoxelShape north, Vec3 rotationCenter) static Map<AttachFace, Map<Direction, VoxelShape>> rotateAttachFace(VoxelShape north) static Map<AttachFace, Map<Direction, VoxelShape>> rotateAttachFace(VoxelShape north, OctahedralGroup initial) static Map<Direction, VoxelShape> rotateHorizontal(VoxelShape north) static Map<Direction, VoxelShape> rotateHorizontal(VoxelShape north, OctahedralGroup initial) static Map<Direction, VoxelShape> rotateHorizontal(VoxelShape north, OctahedralGroup initial, Vec3 rotationCenter) static Map<Direction.Axis, VoxelShape> rotateHorizontalAxis(VoxelShape zAxis) static Map<Direction.Axis, VoxelShape> rotateHorizontalAxis(VoxelShape zAxis, Vec3 rotationCenter)
-
Field Details
-
EPSILON
public static final double EPSILON- See Also:
-
BIG_EPSILON
public static final double BIG_EPSILON- See Also:
-
BLOCK
-
BLOCK_CENTER
-
INFINITY
-
EMPTY
-
-
Constructor Details
-
Shapes
public Shapes()
-
-
Method Details
-
empty
-
block
-
box
public static VoxelShape box(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) -
create
public static VoxelShape create(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) -
create
-
findBits
protected static int findBits(double min, double max) -
lcm
protected static long lcm(int first, int second) -
or
-
or
-
join
-
joinUnoptimized
-
joinIsNotEmpty
-
joinIsNotEmpty
private static boolean joinIsNotEmpty(IndexMerger xMerger, IndexMerger yMerger, IndexMerger zMerger, DiscreteVoxelShape first, DiscreteVoxelShape second, BooleanOp op) -
collide
public static double collide(Direction.Axis axis, AABB moving, Iterable<VoxelShape> shapes, double distance) -
blockOccludes
-
mergedFaceOccludes
public static boolean mergedFaceOccludes(VoxelShape shape, VoxelShape occluder, Direction direction) -
faceShapeOccludes
-
createIndexMerger
protected static IndexMerger createIndexMerger(int cost, it.unimi.dsi.fastutil.doubles.DoubleList first, it.unimi.dsi.fastutil.doubles.DoubleList second, boolean firstOnlyMatters, boolean secondOnlyMatters) -
rotate
-
rotate
-
flipAxisIfNeeded
static it.unimi.dsi.fastutil.doubles.DoubleList flipAxisIfNeeded(it.unimi.dsi.fastutil.doubles.DoubleList newAxis, boolean flip, double newRelative, double oldRelative) -
equal
-
rotateHorizontalAxis
-
rotateHorizontalAxis
public static Map<Direction.Axis, VoxelShape> rotateHorizontalAxis(VoxelShape zAxis, Vec3 rotationCenter) -
rotateAllAxis
-
rotateAllAxis
-
rotateHorizontal
-
rotateHorizontal
public static Map<Direction, VoxelShape> rotateHorizontal(VoxelShape north, OctahedralGroup initial) -
rotateHorizontal
public static Map<Direction, VoxelShape> rotateHorizontal(VoxelShape north, OctahedralGroup initial, Vec3 rotationCenter) -
rotateAll
-
rotateAll
-
rotateAll
public static Map<Direction, VoxelShape> rotateAll(VoxelShape north, OctahedralGroup initial, Vec3 rotationCenter) -
rotateAttachFace
-
rotateAttachFace
public static Map<AttachFace, Map<Direction, VoxelShape>> rotateAttachFace(VoxelShape north, OctahedralGroup initial)
-