Record Class TextAnnotationData
java.lang.Object
java.lang.Record
fr.ghostrider584.axiom.annotation.data.TextAnnotationData
- All Implemented Interfaces:
AnnotationData
public record TextAnnotationData(String text, org.joml.Vector3f position, org.joml.Quaternionf rotation, net.minestom.server.utils.Direction direction, float fallbackYaw, float scale, byte billboardMode, int colour, boolean shadow)
extends Record
implements AnnotationData
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minestom.server.network.NetworkBuffer.Type<TextAnnotationData> -
Constructor Summary
ConstructorsConstructorDescriptionTextAnnotationData(String text, org.joml.Vector3f position, org.joml.Quaternionf rotation, net.minestom.server.utils.Direction direction, float fallbackYaw, float scale, byte billboardMode, int colour, boolean shadow) Creates an instance of aTextAnnotationDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyteReturns the value of thebillboardModerecord component.intcolour()Returns the value of thecolourrecord component.net.minestom.server.utils.DirectionReturns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.floatReturns the value of thefallbackYawrecord component.final inthashCode()Returns a hash code value for this object.org.joml.Vector3fposition()Returns the value of thepositionrecord component.org.joml.Quaternionfrotation()Returns the value of therotationrecord component.floatscale()Returns the value of thescalerecord component.voidsetPosition(org.joml.Vector3fc position) voidsetRotation(org.joml.Quaternionfc rotation) booleanshadow()Returns the value of theshadowrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
TYPE
-
-
Constructor Details
-
TextAnnotationData
public TextAnnotationData(String text, org.joml.Vector3f position, org.joml.Quaternionf rotation, net.minestom.server.utils.Direction direction, float fallbackYaw, float scale, byte billboardMode, int colour, boolean shadow) Creates an instance of aTextAnnotationDatarecord class.- Parameters:
text- the value for thetextrecord componentposition- the value for thepositionrecord componentrotation- the value for therotationrecord componentdirection- the value for thedirectionrecord componentfallbackYaw- the value for thefallbackYawrecord componentscale- the value for thescalerecord componentbillboardMode- the value for thebillboardModerecord componentcolour- the value for thecolourrecord componentshadow- the value for theshadowrecord component
-
-
Method Details
-
setPosition
public void setPosition(org.joml.Vector3fc position) - Specified by:
setPositionin interfaceAnnotationData
-
setRotation
public void setRotation(org.joml.Quaternionfc rotation) - Specified by:
setRotationin interfaceAnnotationData
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
position
public org.joml.Vector3f position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
rotation
public org.joml.Quaternionf rotation()Returns the value of therotationrecord component.- Returns:
- the value of the
rotationrecord component
-
direction
public net.minestom.server.utils.Direction direction()Returns the value of thedirectionrecord component.- Returns:
- the value of the
directionrecord component
-
fallbackYaw
public float fallbackYaw()Returns the value of thefallbackYawrecord component.- Returns:
- the value of the
fallbackYawrecord component
-
scale
public float scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-
billboardMode
public byte billboardMode()Returns the value of thebillboardModerecord component.- Returns:
- the value of the
billboardModerecord component
-
colour
public int colour()Returns the value of thecolourrecord component.- Returns:
- the value of the
colourrecord component
-
shadow
public boolean shadow()Returns the value of theshadowrecord component.- Returns:
- the value of the
shadowrecord component
-