Record Class CubeShape
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.shape.CubeShape
- All Implemented Interfaces:
CustomRegistryOwnTypeProvider<io.netty.buffer.ByteBuf, Shape>, CustomRegistryValue<io.netty.buffer.ByteBuf, Shape>, RefOptimizer<Shape>, WithKey, Shape
-
Field Summary
FieldsFields inherited from interface Shape
CODEC, DATA_TYPE, REGISTRY, STREAM_CODECFields inherited from interface WithKey
COMPARATOR -
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.booleanisVisible(double x, double y, double z, FrustumCheck frustum) optimize()floatsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.DynamicType<io.netty.buffer.ByteBuf, Shape> type()Methods inherited from interface CustomRegistryValue
optionalKey, refMethods inherited from interface Shape
getRegistry
-
Field Details
-
UNIT_CUBE
-
TYPE
-
-
Constructor Details
-
CubeShape
public CubeShape(float size) Creates an instance of aCubeShaperecord class.- Parameters:
size- the value for thesizerecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceCustomRegistryOwnTypeProvider<io.netty.buffer.ByteBuf, Shape>
-
buildLines
- Specified by:
buildLinesin interfaceShape
-
buildQuads
- Specified by:
buildQuadsin interfaceShape
-
contains
-
isVisible
-
optimize
- Specified by:
optimizein interfaceRefOptimizer<Shape>
-
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 with thecomparemethod from their corresponding wrapper classes. -
size
public float size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-