Record Class TextAnnotationData
java.lang.Object
java.lang.Record
fr.ghostrider584.axiom.annotation.data.TextAnnotationData
- All Implemented Interfaces:
AnnotationData
public record TextAnnotationData(String text, net.minestom.server.coordinate.Point position, 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, net.minestom.server.coordinate.Point position, 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.net.minestom.server.coordinate.Pointposition()Returns the value of thepositionrecord component.rotation()Returns the value of therotationrecord component.floatscale()Returns the value of thescalerecord component.booleanshadow()Returns the value of theshadowrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.withPosition(net.minestom.server.coordinate.Point position) withRotation(Quaternionf rotation)
-
Field Details
-
TYPE
-
-
Constructor Details
-
TextAnnotationData
public TextAnnotationData(String text, net.minestom.server.coordinate.Point position, 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
-
withPosition
- Specified by:
withPositionin interfaceAnnotationData
-
withRotation
- Specified by:
withRotationin interfaceAnnotationData
-
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. -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
position
public net.minestom.server.coordinate.Point position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
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
-