Record Class SphereShape
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.shape.SphereShape
- All Implemented Interfaces:
Shape
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<SphereShape> static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, SphereShape> static final ShapeTypestatic final SphereShapeFields inherited from interface Shape
DATA_TYPE, DIRECT_CODEC, DIRECT_STREAM_CODEC, UNIT_OR_DIRECT_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionSphereShape(float radius) Creates an instance of aSphereShaperecord class. -
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.floatradius()Returns the value of theradiusrecord component.final StringtoString()Returns a string representation of this record class.type()
-
Field Details
-
UNIT
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, SphereShape> STREAM_CODEC -
TYPE
-
-
Constructor Details
-
SphereShape
public SphereShape(float radius) Creates an instance of aSphereShaperecord class.- Parameters:
radius- the value for theradiusrecord component
-
-
Method Details
-
type
-
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 with thecomparemethod from their corresponding wrapper classes. -
radius
public float radius()Returns the value of theradiusrecord component.- Returns:
- the value of the
radiusrecord component
-