Record Class OpenMenuScreenMessage

java.lang.Object
java.lang.Record
info.u_team.u_team_core.intern.init.network.OpenMenuScreenMessage

public record OpenMenuScreenMessage(int containerId, net.minecraft.world.inventory.MenuType<?> type, net.minecraft.network.chat.Component title, net.minecraft.network.FriendlyByteBuf extraData) extends Record
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    OpenMenuScreenMessage(int containerId, net.minecraft.world.inventory.MenuType<?> type, net.minecraft.network.chat.Component title, net.minecraft.network.FriendlyByteBuf extraData)
    Creates an instance of a OpenMenuScreenMessage record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the containerId record component.
    decode(net.minecraft.network.FriendlyByteBuf buffer)
     
    static void
    encode(OpenMenuScreenMessage message, net.minecraft.network.FriendlyByteBuf buffer)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.minecraft.network.FriendlyByteBuf
    Returns the value of the extraData record component.
    final int
    Returns a hash code value for this object.
    net.minecraft.network.chat.Component
    Returns the value of the title record component.
    final String
    Returns a string representation of this record class.
    net.minecraft.world.inventory.MenuType<?>
    Returns the value of the type record component.

    Methods inherited from class java.lang.Object

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

    • OpenMenuScreenMessage

      public OpenMenuScreenMessage(int containerId, net.minecraft.world.inventory.MenuType<?> type, net.minecraft.network.chat.Component title, net.minecraft.network.FriendlyByteBuf extraData)
      Creates an instance of a OpenMenuScreenMessage record class.
      Parameters:
      containerId - the value for the containerId record component
      type - the value for the type record component
      title - the value for the title record component
      extraData - the value for the extraData record component
  • Method Details

    • encode

      public static void encode(OpenMenuScreenMessage message, net.minecraft.network.FriendlyByteBuf buffer)
    • decode

      public static OpenMenuScreenMessage decode(net.minecraft.network.FriendlyByteBuf buffer)
    • 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.
    • containerId

      public int containerId()
      Returns the value of the containerId record component.
      Returns:
      the value of the containerId record component
    • type

      public net.minecraft.world.inventory.MenuType<?> type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • title

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

      public net.minecraft.network.FriendlyByteBuf extraData()
      Returns the value of the extraData record component.
      Returns:
      the value of the extraData record component