Record Class NativeBundleTooltipItems

java.lang.Object
java.lang.Record
net.raphimc.viabedrock.api.model.NativeBundleTooltipItems

public record NativeBundleTooltipItems(int identity, int slots, Map<Integer, NativeBundleTooltipItems.Preview> entries) extends Record
Physical previews are independent of the compacted and capacity-limited Java bundle component.
  • Field Details

  • Constructor Details

    • NativeBundleTooltipItems

      public NativeBundleTooltipItems(int identity, int slots, Map<Integer, NativeBundleTooltipItems.Preview> entries)
      Creates an instance of a NativeBundleTooltipItems record class.
      Parameters:
      identity - the value for the identity record component
      slots - the value for the slots record component
      entries - the value for the entries record component
  • Method Details

    • matches

      public boolean matches(NativeBundleTooltipData data)
    • encode

      public byte[] encode()
    • fromTag

      public static NativeBundleTooltipItems fromTag(com.viaversion.nbt.tag.CompoundTag tag)
    • decode

      public static NativeBundleTooltipItems decode(byte[] bytes, NativeBundleTooltipData data)
    • 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.
    • identity

      public int identity()
      Returns the value of the identity record component.
      Returns:
      the value of the identity record component
    • slots

      public int slots()
      Returns the value of the slots record component.
      Returns:
      the value of the slots record component
    • entries

      Returns the value of the entries record component.
      Returns:
      the value of the entries record component