Record Class VoxelShapeRegistry.Shape
java.lang.Object
java.lang.Record
net.raphimc.viabedrock.protocol.storage.VoxelShapeRegistry.Shape
- Enclosing class:
VoxelShapeRegistry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]cells()Returns the value of thecellsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanoccupied(int x, int y, int z) final StringtoString()Returns a string representation of this record class.Returns the value of thexCoordinatesrecord component.intxSize()Returns the value of thexSizerecord component.Returns the value of theyCoordinatesrecord component.intySize()Returns the value of theySizerecord component.Returns the value of thezCoordinatesrecord component.intzSize()Returns the value of thezSizerecord component.
-
Constructor Details
-
Shape
public Shape(int xSize, int ySize, int zSize, byte[] cells, List<Float> xCoordinates, List<Float> yCoordinates, List<Float> zCoordinates) Creates an instance of aShaperecord class.- Parameters:
xSize- the value for thexSizerecord componentySize- the value for theySizerecord componentzSize- the value for thezSizerecord componentcells- the value for thecellsrecord componentxCoordinates- the value for thexCoordinatesrecord componentyCoordinates- the value for theyCoordinatesrecord componentzCoordinates- the value for thezCoordinatesrecord component
-
-
Method Details
-
cells
public byte[] cells()Returns the value of thecellsrecord component.- Returns:
- the value of the
cellsrecord component
-
occupied
public boolean occupied(int x, int y, int z) -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
xSize
public int xSize()Returns the value of thexSizerecord component.- Returns:
- the value of the
xSizerecord component
-
ySize
public int ySize()Returns the value of theySizerecord component.- Returns:
- the value of the
ySizerecord component
-
zSize
public int zSize()Returns the value of thezSizerecord component.- Returns:
- the value of the
zSizerecord component
-
xCoordinates
-
yCoordinates
-
zCoordinates
-