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 -
Constructor Summary
ConstructorsConstructorDescriptionOpenMenuScreenMessage(int containerId, net.minecraft.world.inventory.MenuType<?> type, net.minecraft.network.chat.Component title, net.minecraft.network.FriendlyByteBuf extraData) Creates an instance of aOpenMenuScreenMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecontainerIdrecord component.static OpenMenuScreenMessagedecode(net.minecraft.network.FriendlyByteBuf buffer) static voidencode(OpenMenuScreenMessage message, net.minecraft.network.FriendlyByteBuf buffer) final booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.FriendlyByteBufReturns the value of theextraDatarecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.network.chat.Componenttitle()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.world.inventory.MenuType<?>type()Returns the value of thetyperecord component.
-
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 aOpenMenuScreenMessagerecord class.- Parameters:
containerId- the value for thecontainerIdrecord componenttype- the value for thetyperecord componenttitle- the value for thetitlerecord componentextraData- the value for theextraDatarecord component
-
-
Method Details
-
encode
public static void encode(OpenMenuScreenMessage message, net.minecraft.network.FriendlyByteBuf buffer) -
decode
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
containerId
public int containerId()Returns the value of thecontainerIdrecord component.- Returns:
- the value of the
containerIdrecord component
-
type
public net.minecraft.world.inventory.MenuType<?> type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
title
public net.minecraft.network.chat.Component title()Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
extraData
public net.minecraft.network.FriendlyByteBuf extraData()Returns the value of theextraDatarecord component.- Returns:
- the value of the
extraDatarecord component
-