Record Class DataHolderMenuMessage
java.lang.Object
java.lang.Record
info.u_team.u_team_core.intern.network.DataHolderMenuMessage
public record DataHolderMenuMessage(int containerId, int index, net.minecraft.network.FriendlyByteBuf dataHolderBuffer)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDataHolderMenuMessage
(int containerId, int index, net.minecraft.network.FriendlyByteBuf dataHolderBuffer) Creates an instance of aDataHolderMenuMessage
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thecontainerId
record component.net.minecraft.network.FriendlyByteBuf
Returns the value of thedataHolderBuffer
record component.static DataHolderMenuMessage
decode
(net.minecraft.network.FriendlyByteBuf byteBuf) static void
encode
(DataHolderMenuMessage message, net.minecraft.network.FriendlyByteBuf byteBuf) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
index()
Returns the value of theindex
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
DataHolderMenuMessage
public DataHolderMenuMessage(int containerId, int index, net.minecraft.network.FriendlyByteBuf dataHolderBuffer) Creates an instance of aDataHolderMenuMessage
record class.- Parameters:
containerId
- the value for thecontainerId
record componentindex
- the value for theindex
record componentdataHolderBuffer
- the value for thedataHolderBuffer
record component
-
-
Method Details
-
encode
public static void encode(DataHolderMenuMessage message, net.minecraft.network.FriendlyByteBuf byteBuf) -
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 thecontainerId
record component.- Returns:
- the value of the
containerId
record component
-
index
public int index()Returns the value of theindex
record component.- Returns:
- the value of the
index
record component
-
dataHolderBuffer
public net.minecraft.network.FriendlyByteBuf dataHolderBuffer()Returns the value of thedataHolderBuffer
record component.- Returns:
- the value of the
dataHolderBuffer
record component
-