Record Class TextScreen

java.lang.Object
java.lang.Record
net.flectone.pulse.model.value.TextScreen
Record Components:
background - the background color in ARGB hex
hasShadow - whether the text is drawn with a shadow
seeThrough - whether the text shows through blocks
animationTime - how long the reveal animation runs, in ticks
liveTime - how long the text stays after appearing, in ticks
width - the wrapping width
scale - the text scale
offsetX - the horizontal offset from the player
offsetY - the vertical offset from the player
offsetZ - the forward offset from the player

public record TextScreen(String background, boolean hasShadow, boolean seeThrough, int animationTime, int liveTime, int width, float scale, float offsetX, float offsetY, float offsetZ) extends Record
Floating text drawn in the world in front of the player.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TextScreen(String background, boolean hasShadow, boolean seeThrough, int animationTime, int liveTime, int width, float scale, float offsetX, float offsetY, float offsetZ)
    Creates an instance of a TextScreen record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the animationTime record component.
    Returns the value of the background record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Whether the text is revealed with an animation rather than appearing at once.
    final int
    Returns a hash code value for this object.
    boolean
    Whether the text disappears on its own instead of staying until replaced.
    boolean
    Returns the value of the hasShadow record component.
    int
    Returns the value of the liveTime record component.
    float
    Returns the value of the offsetX record component.
    float
    Returns the value of the offsetY record component.
    float
    Returns the value of the offsetZ record component.
    float
    Returns the value of the scale record component.
    boolean
    Returns the value of the seeThrough record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the width record component.

    Methods inherited from class Object

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

    • TextScreen

      public TextScreen(String background, boolean hasShadow, boolean seeThrough, int animationTime, int liveTime, int width, float scale, float offsetX, float offsetY, float offsetZ)
      Creates an instance of a TextScreen record class.
      Parameters:
      background - the value for the background record component
      hasShadow - the value for the hasShadow record component
      seeThrough - the value for the seeThrough record component
      animationTime - the value for the animationTime record component
      liveTime - the value for the liveTime record component
      width - the value for the width record component
      scale - the value for the scale record component
      offsetX - the value for the offsetX record component
      offsetY - the value for the offsetY record component
      offsetZ - the value for the offsetZ record component
  • Method Details

    • hasAnimation

      public boolean hasAnimation()
      Whether the text is revealed with an animation rather than appearing at once.
      Returns:
      true if an animation time is set
    • hasLiveTime

      public boolean hasLiveTime()
      Whether the text disappears on its own instead of staying until replaced.
      Returns:
      true if a live time is set
    • 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.
    • background

      public String background()
      Returns the value of the background record component.
      Returns:
      the value of the background record component
    • hasShadow

      public boolean hasShadow()
      Returns the value of the hasShadow record component.
      Returns:
      the value of the hasShadow record component
    • seeThrough

      public boolean seeThrough()
      Returns the value of the seeThrough record component.
      Returns:
      the value of the seeThrough record component
    • animationTime

      public int animationTime()
      Returns the value of the animationTime record component.
      Returns:
      the value of the animationTime record component
    • liveTime

      public int liveTime()
      Returns the value of the liveTime record component.
      Returns:
      the value of the liveTime record component
    • width

      public int width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • scale

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

      public float offsetX()
      Returns the value of the offsetX record component.
      Returns:
      the value of the offsetX record component
    • offsetY

      public float offsetY()
      Returns the value of the offsetY record component.
      Returns:
      the value of the offsetY record component
    • offsetZ

      public float offsetZ()
      Returns the value of the offsetZ record component.
      Returns:
      the value of the offsetZ record component