Record Class DataHolderMenuMessage
java.lang.Object
java.lang.Record
info.u_team.u_team_core.intern.init.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 aDataHolderMenuMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecontainerIdrecord component.net.minecraft.network.FriendlyByteBufReturns the value of thedataHolderBufferrecord component.static DataHolderMenuMessagedecode(net.minecraft.network.FriendlyByteBuf buffer) static voidencode(DataHolderMenuMessage message, net.minecraft.network.FriendlyByteBuf buffer) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.final StringtoString()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 aDataHolderMenuMessagerecord class.- Parameters:
containerId- the value for thecontainerIdrecord componentindex- the value for theindexrecord componentdataHolderBuffer- the value for thedataHolderBufferrecord component
-
-
Method Details
-
encode
public static void encode(DataHolderMenuMessage 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
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
dataHolderBuffer
public net.minecraft.network.FriendlyByteBuf dataHolderBuffer()Returns the value of thedataHolderBufferrecord component.- Returns:
- the value of the
dataHolderBufferrecord component
-