Record Class VoxelShapeBox
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.math.VoxelShapeBox
- All Implemented Interfaces:
Shape
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VoxelShapeBoxstatic final VoxelShapeBoxstatic final VoxelShapeBoxstatic final VoxelShapeBoxstatic final VoxelShapeBoxstatic final VoxelShapeBoxstatic final VoxelShapeBoxstatic final com.mojang.serialization.MapCodec<VoxelShapeBox> static final VoxelShapeBoxstatic final VoxelShapeBoxstatic final VoxelShapeBoxstatic final VoxelShapeBoxstatic final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, VoxelShapeBox> static final ShapeTypeFields inherited from interface Shape
DATA_TYPE, DIRECT_CODEC, DIRECT_STREAM_CODEC, UNIT_OR_DIRECT_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionVoxelShapeBox(List<Line> edges, List<net.minecraft.world.phys.AABB> boxes, boolean singleBox) Creates an instance of aVoxelShapeBoxrecord class. -
Method Summary
Modifier and TypeMethodDescriptionList<net.minecraft.world.phys.AABB> boxes()Returns the value of theboxesrecord component.voidbuildLines(float x, float y, float z, VertexCallback callback) voidbuildLines(net.minecraft.world.phys.Vec3 offset, VertexCallback callback) voidbuildQuads(float x, float y, float z, VertexCallback callback) voidbuildQuads(net.minecraft.world.phys.Vec3 offset, VertexCallback callback) edges()Returns the value of theedgesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.move(double x, double y, double z) static VoxelShapeBoxof(net.minecraft.world.phys.AABB box) static VoxelShapeBoxof(net.minecraft.world.phys.shapes.VoxelShape shape) scale(double sx, double sy, double sz) booleanReturns the value of thesingleBoxrecord component.final StringtoString()Returns a string representation of this record class.type()
-
Field Details
-
EMPTY
-
FULL
-
FULL_16
-
INFINITE
-
CENTERED
-
CENTERED_X_PLANE
-
CENTERED_Y_PLANE
-
CENTERED_Z_PLANE
-
CENTERED_X_AXIS
-
CENTERED_Y_AXIS
-
CENTERED_Z_AXIS
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, VoxelShapeBox> STREAM_CODEC -
TYPE
-
-
Constructor Details
-
VoxelShapeBox
public VoxelShapeBox(List<Line> edges, List<net.minecraft.world.phys.AABB> boxes, boolean singleBox) Creates an instance of aVoxelShapeBoxrecord class.- Parameters:
edges- the value for theedgesrecord componentboxes- the value for theboxesrecord componentsingleBox- the value for thesingleBoxrecord component
-
-
Method Details
-
of
-
of
-
buildQuads
-
buildLines
-
move
-
scale
-
type
-
buildLines
- Specified by:
buildLinesin interfaceShape
-
buildQuads
- Specified by:
buildQuadsin interfaceShape
-
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. -
edges
-
boxes
Returns the value of theboxesrecord component.- Returns:
- the value of the
boxesrecord component
-
singleBox
public boolean singleBox()Returns the value of thesingleBoxrecord component.- Returns:
- the value of the
singleBoxrecord component
-