Record Class AdvancementsPacket.DisplayData

java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.AdvancementsPacket.DisplayData
All Implemented Interfaces:
Writeable
Enclosing class:
AdvancementsPacket

public static record AdvancementsPacket.DisplayData(@NotNull Component title, @NotNull Component description, @NotNull ItemStack icon, @NotNull FrameType frameType, int flags, @Nullable String backgroundTexture, float x, float y) extends Record implements Writeable
  • Constructor Summary

    Constructors
    Constructor
    Description
    DisplayData(@NotNull Component title, @NotNull Component description, @NotNull ItemStack icon, @NotNull FrameType frameType, int flags, @Nullable String backgroundTexture, float x, float y)
    Creates an instance of a DisplayData record class.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable String
    Returns the value of the backgroundTexture record component.
    @NotNull Component
    Returns the value of the description record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the flags record component.
    @NotNull FrameType
    Returns the value of the frameType record component.
    final int
    Returns a hash code value for this object.
    @NotNull ItemStack
    Returns the value of the icon record component.
    @NotNull Component
    Returns the value of the title record component.
    final String
    Returns a string representation of this record class.
    void
    write(@NotNull BinaryWriter writer)
    Writes into a BinaryWriter.
    float
    x()
    Returns the value of the x record component.
    float
    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

    • DisplayData

      public DisplayData(BinaryReader reader)
    • DisplayData

      public DisplayData(@NotNull @NotNull Component title, @NotNull @NotNull Component description, @NotNull @NotNull ItemStack icon, @NotNull @NotNull FrameType frameType, int flags, @Nullable @Nullable String backgroundTexture, float x, float y)
      Creates an instance of a DisplayData record class.
      Parameters:
      title - the value for the title record component
      description - the value for the description record component
      icon - the value for the icon record component
      frameType - the value for the frameType record component
      flags - the value for the flags record component
      backgroundTexture - the value for the backgroundTexture record component
      x - the value for the x record component
      y - the value for the y record component
  • Method Details

    • write

      public void write(@NotNull @NotNull BinaryWriter writer)
      Description copied from interface: Writeable
      Writes into a BinaryWriter.
      Specified by:
      write in interface Writeable
      Parameters:
      writer - the writer to write to
    • 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.
    • title

      @NotNull public @NotNull Component title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • description

      @NotNull public @NotNull Component description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • icon

      @NotNull public @NotNull ItemStack icon()
      Returns the value of the icon record component.
      Returns:
      the value of the icon record component
    • frameType

      @NotNull public @NotNull FrameType frameType()
      Returns the value of the frameType record component.
      Returns:
      the value of the frameType record component
    • flags

      public int flags()
      Returns the value of the flags record component.
      Returns:
      the value of the flags record component
    • backgroundTexture

      @Nullable public @Nullable String backgroundTexture()
      Returns the value of the backgroundTexture record component.
      Returns:
      the value of the backgroundTexture record component
    • x

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

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