Record Class ClientClickWindowPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.client.play.ClientClickWindowPacket
- All Implemented Interfaces:
ClientPacket
public record ClientClickWindowPacket(int windowId, int stateId, short slot, byte button, ClientClickWindowPacket.ClickType clickType, Map<Short, ItemStack.Hash> changedSlots, ItemStack.Hash clickedItem)
extends Record
implements ClientPacket
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final NetworkBuffer.Type<ClientClickWindowPacket> -
Constructor Summary
ConstructorsConstructorDescriptionClientClickWindowPacket(int windowId, int stateId, short slot, byte button, ClientClickWindowPacket.ClickType clickType, Map<Short, ItemStack.Hash> changedSlots, ItemStack.Hash clickedItem) Creates an instance of aClientClickWindowPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbytebutton()Returns the value of thebuttonrecord component.Returns the value of thechangedSlotsrecord component.Returns the value of theclickedItemrecord component.Returns the value of theclickTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.shortslot()Returns the value of theslotrecord component.intstateId()Returns the value of thestateIdrecord component.final StringtoString()Returns a string representation of this record class.intwindowId()Returns the value of thewindowIdrecord component.
-
Field Details
-
MAX_CHANGED_SLOTS
public static final int MAX_CHANGED_SLOTS- See Also:
-
SERIALIZER
-
-
Constructor Details
-
ClientClickWindowPacket
public ClientClickWindowPacket(int windowId, int stateId, short slot, byte button, ClientClickWindowPacket.ClickType clickType, Map<Short, ItemStack.Hash> changedSlots, ItemStack.Hash clickedItem) Creates an instance of aClientClickWindowPacketrecord class.- Parameters:
windowId- the value for thewindowIdrecord componentstateId- the value for thestateIdrecord componentslot- the value for theslotrecord componentbutton- the value for thebuttonrecord componentclickType- the value for theclickTyperecord componentchangedSlots- the value for thechangedSlotsrecord componentclickedItem- the value for theclickedItemrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
windowId
public int windowId()Returns the value of thewindowIdrecord component.- Returns:
- the value of the
windowIdrecord component
-
stateId
public int stateId()Returns the value of thestateIdrecord component.- Returns:
- the value of the
stateIdrecord component
-
slot
public short slot()Returns the value of theslotrecord component.- Returns:
- the value of the
slotrecord component
-
button
public byte button()Returns the value of thebuttonrecord component.- Returns:
- the value of the
buttonrecord component
-
clickType
Returns the value of theclickTyperecord component.- Returns:
- the value of the
clickTyperecord component
-
changedSlots
Returns the value of thechangedSlotsrecord component.- Returns:
- the value of the
changedSlotsrecord component
-
clickedItem
Returns the value of theclickedItemrecord component.- Returns:
- the value of the
clickedItemrecord component
-