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

    Fields
    Modifier and Type
    Field
    Description
    static final net.minestom.server.network.NetworkBuffer.Type<TextAnnotationData>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 a TextAnnotationData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte
    Returns the value of the billboardMode record component.
    int
    Returns the value of the colour record component.
    net.minestom.server.utils.Direction
    Returns the value of the direction record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    float
    Returns the value of the fallbackYaw record component.
    final int
    Returns a hash code value for this object.
    net.minestom.server.coordinate.Point
    Returns the value of the position record component.
    Returns the value of the rotation record component.
    float
    Returns the value of the scale record component.
    boolean
    Returns the value of the shadow record component.
    Returns the value of the text record component.
    final String
    Returns a string representation of this record class.
    withPosition(net.minestom.server.coordinate.Point position)
     
     

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • TYPE

      public static final net.minestom.server.network.NetworkBuffer.Type<TextAnnotationData> 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 a TextAnnotationData record class.
      Parameters:
      text - the value for the text record component
      position - the value for the position record component
      rotation - the value for the rotation record component
      direction - the value for the direction record component
      fallbackYaw - the value for the fallbackYaw record component
      scale - the value for the scale record component
      billboardMode - the value for the billboardMode record component
      colour - the value for the colour record component
      shadow - the value for the shadow record component
  • Method Details

    • withPosition

      public TextAnnotationData withPosition(net.minestom.server.coordinate.Point position)
      Specified by:
      withPosition in interface AnnotationData
    • withRotation

      public TextAnnotationData withRotation(Quaternionf rotation)
      Specified by:
      withRotation in interface AnnotationData
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • text

      public String text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component
    • position

      public net.minestom.server.coordinate.Point position()
      Returns the value of the position record component.
      Returns:
      the value of the position record component
    • rotation

      public Quaternionf rotation()
      Returns the value of the rotation record component.
      Returns:
      the value of the rotation record component
    • direction

      public net.minestom.server.utils.Direction direction()
      Returns the value of the direction record component.
      Returns:
      the value of the direction record component
    • fallbackYaw

      public float fallbackYaw()
      Returns the value of the fallbackYaw record component.
      Returns:
      the value of the fallbackYaw record component
    • scale

      public float scale()
      Returns the value of the scale record component.
      Returns:
      the value of the scale record component
    • billboardMode

      public byte billboardMode()
      Returns the value of the billboardMode record component.
      Returns:
      the value of the billboardMode record component
    • colour

      public int colour()
      Returns the value of the colour record component.
      Returns:
      the value of the colour record component
    • shadow

      public boolean shadow()
      Returns the value of the shadow record component.
      Returns:
      the value of the shadow record component