Record Class BossBarTextState

java.lang.Object
java.lang.Record
net.lcc.sollib.api.client.ui.bossbar.BossBarTextState

public record BossBarTextState(net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component text, net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int color, boolean dropShadow, float scale) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    BossBarTextState(net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component text, net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int color, boolean dropShadow, float scale)
    Creates an instance of a BossBarTextState record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the color record component.
    boolean
    Returns the value of the dropShadow record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.minecraft.client.gui.Font
    Returns the value of the font record component.
    net.minecraft.client.gui.GuiGraphics
    Returns the value of the guiGraphics record component.
    final int
    Returns a hash code value for this object.
    float
    Returns the value of the scale record component.
    net.minecraft.network.chat.Component
    Returns the value of the text record component.
    final String
    Returns a string representation of this record class.
    withColor(int newColor)
     
    withComponent(net.minecraft.network.chat.Component newText)
     
    withFont(net.minecraft.client.gui.Font newFont)
     
    withPosition(int newX, int newY)
     
    withScale(float newScale)
     
    withShadow(boolean newDropShadow)
     
    int
    x()
    Returns the value of the x record component.
    int
    y()
    Returns the value of the y record component.

    Methods inherited from class java.lang.Object

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

    • BossBarTextState

      public BossBarTextState(net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component text, net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int color, boolean dropShadow, float scale)
      Creates an instance of a BossBarTextState record class.
      Parameters:
      font - the value for the font record component
      text - the value for the text record component
      guiGraphics - the value for the guiGraphics record component
      x - the value for the x record component
      y - the value for the y record component
      color - the value for the color record component
      dropShadow - the value for the dropShadow record component
      scale - the value for the scale record component
  • Method Details

    • withComponent

      public BossBarTextState withComponent(net.minecraft.network.chat.Component newText)
    • withPosition

      public BossBarTextState withPosition(int newX, int newY)
    • withFont

      public BossBarTextState withFont(net.minecraft.client.gui.Font newFont)
    • withColor

      public BossBarTextState withColor(int newColor)
    • withShadow

      public BossBarTextState withShadow(boolean newDropShadow)
    • withScale

      public BossBarTextState withScale(float newScale)
    • 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 '=='.
      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.
    • font

      public net.minecraft.client.gui.Font font()
      Returns the value of the font record component.
      Returns:
      the value of the font record component
    • text

      public net.minecraft.network.chat.Component text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component
    • guiGraphics

      public net.minecraft.client.gui.GuiGraphics guiGraphics()
      Returns the value of the guiGraphics record component.
      Returns:
      the value of the guiGraphics record component
    • x

      public int x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public int y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component
    • color

      public int color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component
    • dropShadow

      public boolean dropShadow()
      Returns the value of the dropShadow record component.
      Returns:
      the value of the dropShadow record component
    • scale

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