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
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic enum -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClientClickWindowPacket(byte windowId, int stateId, short slot, byte button, @NotNull ClientClickWindowPacket.ClickType clickType, @NotNull List<ClientClickWindowPacket.ChangedSlot> changedSlots, @NotNull ItemStack clickedItem) Creates an instance of aClientClickWindowPacketrecord class.ClientClickWindowPacket(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescriptionbytebutton()Returns the value of thebuttonrecord component.@NotNull List<ClientClickWindowPacket.ChangedSlot> Returns the value of thechangedSlotsrecord component.@NotNull ItemStackReturns the value of theclickedItemrecord component.@NotNull ClientClickWindowPacket.ClickTypeReturns 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.bytewindowId()Returns the value of thewindowIdrecord component.voidwrite(@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 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
-
ClientClickWindowPacket
-
-
Method Details
-
write
- Specified by:
writein 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 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
-