Package net.minecraft.util.shape
Class VoxelSet
java.lang.Object
net.minecraft.util.shape.VoxelSet
- Direct Known Subclasses:
BitSetVoxelSet
,CroppedVoxelSet
public abstract class VoxelSet extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
VoxelSet.PositionBiConsumer
static interface
VoxelSet.PositionConsumer
-
Field Summary
Fields Modifier and Type Field Description private static Direction.Axis[]
AXES
protected int
xSize
protected int
ySize
protected int
zSize
-
Constructor Summary
Constructors Modifier Constructor Description protected
VoxelSet(int xSize, int ySize, int zSize)
-
Method Summary
Modifier and Type Method Description abstract boolean
contains(int x, int y, int z)
boolean
contains(AxisCycleDirection cycle, int x, int y, int z)
void
forEachBox(VoxelSet.PositionBiConsumer consumer, boolean largest)
void
forEachDirection(VoxelSet.PositionConsumer positionConsumer)
private void
forEachDirection(VoxelSet.PositionConsumer positionConsumer, AxisCycleDirection direction)
void
forEachEdge(VoxelSet.PositionBiConsumer positionBiConsumer, boolean bool)
private void
forEachEdge(VoxelSet.PositionBiConsumer positionBiConsumer, AxisCycleDirection direction, boolean bool)
int
getEndingAxisCoord(Direction.Axis axis, int from, int to)
abstract int
getMax(Direction.Axis axis)
abstract int
getMin(Direction.Axis axis)
int
getSize(Direction.Axis axis)
int
getXSize()
int
getYSize()
int
getZSize()
boolean
inBoundsAndContains(int x, int y, int z)
boolean
inBoundsAndContains(AxisCycleDirection cycle, int x, int y, int z)
protected boolean
isColumnFull(int minZ, int maxZ, int x, int y)
boolean
isEmpty()
protected boolean
isRectangleFull(int minX, int maxX, int minZ, int maxZ, int y)
abstract void
set(int x, int y, int z, boolean resize, boolean included)
protected void
setColumn(int minZ, int maxZ, int x, int y, boolean included)
-
Field Details
-
AXES
-
xSize
protected final int xSize -
ySize
protected final int ySize -
zSize
protected final int zSize
-
-
Constructor Details
-
VoxelSet
protected VoxelSet(int xSize, int ySize, int zSize)
-
-
Method Details
-
inBoundsAndContains
-
inBoundsAndContains
public boolean inBoundsAndContains(int x, int y, int z) -
contains
-
contains
public abstract boolean contains(int x, int y, int z) -
set
public abstract void set(int x, int y, int z, boolean resize, boolean included) -
isEmpty
public boolean isEmpty() -
getMin
-
getMax
-
getEndingAxisCoord
-
getSize
-
getXSize
public int getXSize() -
getYSize
public int getYSize() -
getZSize
public int getZSize() -
forEachEdge
@Environment(CLIENT) public void forEachEdge(VoxelSet.PositionBiConsumer positionBiConsumer, boolean bool) -
forEachEdge
@Environment(CLIENT) private void forEachEdge(VoxelSet.PositionBiConsumer positionBiConsumer, AxisCycleDirection direction, boolean bool) -
isColumnFull
protected boolean isColumnFull(int minZ, int maxZ, int x, int y) -
setColumn
protected void setColumn(int minZ, int maxZ, int x, int y, boolean included) -
isRectangleFull
protected boolean isRectangleFull(int minX, int maxX, int minZ, int maxZ, int y) -
forEachBox
-
forEachDirection
-
forEachDirection
private void forEachDirection(VoxelSet.PositionConsumer positionConsumer, AxisCycleDirection direction)
-