Package net.minecraft.util.shape
Class VoxelShapes
java.lang.Object
net.minecraft.util.shape.VoxelShapes
public final class VoxelShapes extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceVoxelShapes.BoxConsumer -
Field Summary
Fields Modifier and Type Field Description private static VoxelShapeEMPTYprivate static VoxelShapeFULL_CUBEstatic VoxelShapeUNBOUNDED -
Constructor Summary
Constructors Constructor Description VoxelShapes() -
Method Summary
Modifier and Type Method Description static booleanadjacentSidesCoverSquare(VoxelShape one, VoxelShape two, Direction direction)static doublecalculateMaxOffset(Direction.Axis axis, Box box, Stream<VoxelShape> shapes, double maxDist)private static doublecalculatePushVelocity(Box box, WorldView world, double initial, ShapeContext context, AxisCycleDirection direction, Stream<VoxelShape> shapes)static doublecalculatePushVelocity(Direction.Axis axis, Box box, WorldView world, double initial, ShapeContext context, Stream<VoxelShape> shapes)private static intclamp(double value, double min, double max)static VoxelShapecombine(VoxelShape one, VoxelShape two, BooleanBiFunction function)static VoxelShapecombineAndSimplify(VoxelShape first, VoxelShape second, BooleanBiFunction function)protected static PairListcreateListPair(int size, DoubleList first, DoubleList second, boolean includeFirst, boolean includeSecond)static VoxelShapecuboid(double xMin, double yMin, double zMin, double xMax, double yMax, double zMax)static VoxelShapecuboid(Box box)static VoxelShapeempty()static VoxelShapeextrudeFace(VoxelShape shape, Direction direction)protected static intfindRequiredBitResolution(double min, double max)static VoxelShapefullCube()static booleanisSideCovered(VoxelShape shape, VoxelShape neighbor, Direction direction)protected static longlcm(int a, int b)private static booleanmatchesAnywhere(PairList mergedX, PairList mergedY, PairList mergedZ, VoxelSet shape1, VoxelSet shape2, BooleanBiFunction predicate)static booleanmatchesAnywhere(VoxelShape shape1, VoxelShape shape2, BooleanBiFunction predicate)static VoxelShapemethod_31943(double double2, double double3, double double4, double double5, double double6, double double7)static VoxelShapeunion(VoxelShape first, VoxelShape second)static VoxelShapeunion(VoxelShape first, VoxelShape[] others)static booleanunionCoversFullCube(VoxelShape one, VoxelShape two)
-
Field Details
-
FULL_CUBE
-
UNBOUNDED
-
EMPTY
-
-
Constructor Details
-
VoxelShapes
public VoxelShapes()
-
-
Method Details
-
empty
-
fullCube
-
cuboid
public static VoxelShape cuboid(double xMin, double yMin, double zMin, double xMax, double yMax, double zMax) -
method_31943
public static VoxelShape method_31943(double double2, double double3, double double4, double double5, double double6, double double7) -
cuboid
-
findRequiredBitResolution
protected static int findRequiredBitResolution(double min, double max) -
lcm
protected static long lcm(int a, int b) -
union
-
union
-
combineAndSimplify
public static VoxelShape combineAndSimplify(VoxelShape first, VoxelShape second, BooleanBiFunction function) -
combine
-
matchesAnywhere
public static boolean matchesAnywhere(VoxelShape shape1, VoxelShape shape2, BooleanBiFunction predicate) -
matchesAnywhere
-
calculateMaxOffset
public static double calculateMaxOffset(Direction.Axis axis, Box box, Stream<VoxelShape> shapes, double maxDist) -
calculatePushVelocity
public static double calculatePushVelocity(Direction.Axis axis, Box box, WorldView world, double initial, ShapeContext context, Stream<VoxelShape> shapes) -
calculatePushVelocity
private static double calculatePushVelocity(Box box, WorldView world, double initial, ShapeContext context, AxisCycleDirection direction, Stream<VoxelShape> shapes) -
clamp
private static int clamp(double value, double min, double max) -
isSideCovered
@Environment(CLIENT) public static boolean isSideCovered(VoxelShape shape, VoxelShape neighbor, Direction direction) -
extrudeFace
-
adjacentSidesCoverSquare
public static boolean adjacentSidesCoverSquare(VoxelShape one, VoxelShape two, Direction direction) -
unionCoversFullCube
-
createListPair
protected static PairList createListPair(int size, DoubleList first, DoubleList second, boolean includeFirst, boolean includeSecond)
-