Record Class LineShape
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.shape.LineShape
- All Implemented Interfaces:
Shape
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LineShapestatic final LineShapestatic final LineShapestatic final LineShapestatic final CustomRegistryType<io.netty.buffer.ByteBuf, Shape> static final LineShapestatic final LineShapeFields inherited from interface Shape
CODEC, DATA_TYPE, REGISTRY, STREAM_CODEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildLines(float x, float y, float z, VertexCallback callback) voidbuildQuads(float x, float y, float z, VertexCallback callback) booleancontains(org.joml.Vector3fc p) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static LineShapeoptimize()final StringtoString()Returns a string representation of this record class.CustomRegistryType<io.netty.buffer.ByteBuf, Shape> type()vector()Returns the value of thevectorrecord component.
-
Field Details
-
DOWN_UNIT
-
UP_UNIT
-
NORTH_UNIT
-
SOUTH_UNIT
-
WEST_UNIT
-
EAST_UNIT
-
TYPE
-
-
Constructor Details
-
LineShape
Creates an instance of aLineShaperecord class.- Parameters:
vector- the value for thevectorrecord component
-
-
Method Details
-
of
-
type
-
optimize
-
buildLines
- Specified by:
buildLinesin interfaceShape
-
buildQuads
- Specified by:
buildQuadsin interfaceShape
-
contains
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
vector
Returns the value of thevectorrecord component.- Returns:
- the value of the
vectorrecord component
-