Record Class ClientClickWindowPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.client.play.ClientClickWindowPacket
- All Implemented Interfaces:
NetworkBuffer.Writer
,ClientPacket
public record ClientClickWindowPacket(byte windowId, int stateId, short slot, byte button, @NotNull ClientClickWindowPacket.ClickType clickType, @NotNull List<ClientClickWindowPacket.ChangedSlot> changedSlots, @NotNull ItemStack clickedItem)
extends Record
implements ClientPacket
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static enum
-
Field Summary
-
Constructor Summary
ConstructorDescriptionClientClickWindowPacket
(byte windowId, int stateId, short slot, byte button, @NotNull ClientClickWindowPacket.ClickType clickType, @NotNull List<ClientClickWindowPacket.ChangedSlot> changedSlots, @NotNull ItemStack clickedItem) Creates an instance of aClientClickWindowPacket
record class.ClientClickWindowPacket
(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescriptionbyte
button()
Returns the value of thebutton
record component.@NotNull List
<ClientClickWindowPacket.ChangedSlot> Returns the value of thechangedSlots
record component.@NotNull ItemStack
Returns the value of theclickedItem
record component.@NotNull ClientClickWindowPacket.ClickType
Returns the value of theclickType
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.short
slot()
Returns the value of theslot
record component.int
stateId()
Returns the value of thestateId
record component.final String
toString()
Returns a string representation of this record class.byte
windowId()
Returns the value of thewindowId
record component.void
write
(@NotNull NetworkBuffer writer)
-
Field Details
-
MAX_CHANGED_SLOTS
public static final int MAX_CHANGED_SLOTS- See Also:
-
-
Constructor Details
-
ClientClickWindowPacket
public ClientClickWindowPacket(byte windowId, int stateId, short slot, byte button, @NotNull @NotNull ClientClickWindowPacket.ClickType clickType, @NotNull @NotNull List<ClientClickWindowPacket.ChangedSlot> changedSlots, @NotNull @NotNull ItemStack clickedItem) Creates an instance of aClientClickWindowPacket
record class.- Parameters:
windowId
- the value for thewindowId
record componentstateId
- the value for thestateId
record componentslot
- the value for theslot
record componentbutton
- the value for thebutton
record componentclickType
- the value for theclickType
record componentchangedSlots
- the value for thechangedSlots
record componentclickedItem
- the value for theclickedItem
record component
-
ClientClickWindowPacket
-
-
Method Details
-
write
- Specified by:
write
in interfaceNetworkBuffer.Writer
-
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 '=='. -
windowId
public byte windowId()Returns the value of thewindowId
record component.- Returns:
- the value of the
windowId
record component
-
stateId
public int stateId()Returns the value of thestateId
record component.- Returns:
- the value of the
stateId
record component
-
slot
public short slot()Returns the value of theslot
record component.- Returns:
- the value of the
slot
record component
-
button
public byte button()Returns the value of thebutton
record component.- Returns:
- the value of the
button
record component
-
clickType
Returns the value of theclickType
record component.- Returns:
- the value of the
clickType
record component
-
changedSlots
Returns the value of thechangedSlots
record component.- Returns:
- the value of the
changedSlots
record component
-
clickedItem
Returns the value of theclickedItem
record component.- Returns:
- the value of the
clickedItem
record component
-