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 interface
VoxelShapes.BoxConsumer
-
Field Summary
Fields Modifier and Type Field Description private static VoxelShape
EMPTY
private static VoxelShape
FULL_CUBE
static VoxelShape
UNBOUNDED
-
Constructor Summary
Constructors Constructor Description VoxelShapes()
-
Method Summary
Modifier and Type Method Description static boolean
adjacentSidesCoverSquare(VoxelShape one, VoxelShape two, Direction direction)
static double
calculateMaxOffset(Direction.Axis axis, Box box, Stream<VoxelShape> shapes, double maxDist)
private static double
calculatePushVelocity(Box box, WorldView world, double initial, ShapeContext context, AxisCycleDirection direction, Stream<VoxelShape> shapes)
static double
calculatePushVelocity(Direction.Axis axis, Box box, WorldView world, double initial, ShapeContext context, Stream<VoxelShape> shapes)
private static int
clamp(double value, double min, double max)
static VoxelShape
combine(VoxelShape one, VoxelShape two, BooleanBiFunction function)
static VoxelShape
combineAndSimplify(VoxelShape first, VoxelShape second, BooleanBiFunction function)
protected static PairList
createListPair(int size, DoubleList first, DoubleList second, boolean includeFirst, boolean includeSecond)
static VoxelShape
cuboid(double xMin, double yMin, double zMin, double xMax, double yMax, double zMax)
static VoxelShape
cuboid(Box box)
static VoxelShape
empty()
static VoxelShape
extrudeFace(VoxelShape shape, Direction direction)
private static int
findRequiredBitResolution(double min, double max)
static VoxelShape
fullCube()
static boolean
isSideCovered(VoxelShape shape, VoxelShape neighbor, Direction direction)
protected static long
lcm(int a, int b)
private static boolean
matchesAnywhere(PairList mergedX, PairList mergedY, PairList mergedZ, VoxelSet shape1, VoxelSet shape2, BooleanBiFunction predicate)
static boolean
matchesAnywhere(VoxelShape shape1, VoxelShape shape2, BooleanBiFunction predicate)
static VoxelShape
union(VoxelShape first, VoxelShape second)
static VoxelShape
union(VoxelShape first, VoxelShape[] others)
static boolean
unionCoversFullCube(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) -
cuboid
-
findRequiredBitResolution
private 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)
-