Class ServerboundContainerClickPacket

java.lang.Object
org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.inventory.ServerboundContainerClickPacket
All Implemented Interfaces:
Packet, MinecraftPacket

public class ServerboundContainerClickPacket extends Object implements MinecraftPacket
  • Field Details

    • CLICK_OUTSIDE_NOT_HOLDING_SLOT

      public static final int CLICK_OUTSIDE_NOT_HOLDING_SLOT
      See Also:
  • Constructor Details

    • ServerboundContainerClickPacket

      public ServerboundContainerClickPacket(int containerId, int stateId, int slot, @NonNull @NonNull ContainerActionType action, @NonNull @NonNull ContainerAction param, @Nullable ItemStack carriedItem, @NonNull @NonNull Map<Integer,@Nullable ItemStack> changedSlots)
    • ServerboundContainerClickPacket

      public ServerboundContainerClickPacket(int containerId, int stateId, int slot, @NonNull @NonNull ContainerActionType action, @NonNull @NonNull ContainerAction param, @Nullable ItemStack carriedItem, @NonNull @NonNull it.unimi.dsi.fastutil.ints.Int2ObjectMap<@Nullable ItemStack> changedSlots)
    • ServerboundContainerClickPacket

      public ServerboundContainerClickPacket(io.netty.buffer.ByteBuf in)
  • Method Details

    • serialize

      public void serialize(io.netty.buffer.ByteBuf out)
      Specified by:
      serialize in interface MinecraftPacket
    • shouldRunOnGameThread

      public boolean shouldRunOnGameThread()
      Description copied from interface: Packet
      Gets whether the packet should run on an async game thread rather than blocking the network (Netty) thread. Packets that qualify for this are usually packets with an ensureRunningOnSameThread call at the top of their packet listener method in the Minecraft code. Packets which need extra attention because they aren't "fully" handled async are marked using // GAME THREAD DETAIL comments in the MCProtocolLib code.
      Specified by:
      shouldRunOnGameThread in interface Packet
      Returns:
      Whether the packet be handled async from the Netty thread.
    • getContainerId

      public int getContainerId()
    • getStateId

      public int getStateId()
    • getSlot

      public int getSlot()
    • getAction

      @NonNull public @NonNull ContainerActionType getAction()
    • getParam

      @NonNull public @NonNull ContainerAction getParam()
    • getCarriedItem

      public @Nullable ItemStack getCarriedItem()
    • getChangedSlots

      @NonNull public @NonNull it.unimi.dsi.fastutil.ints.Int2ObjectMap<@Nullable ItemStack> getChangedSlots()
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(@Nullable Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public @NonNull String toString()
      Overrides:
      toString in class Object
    • withContainerId

      public @NonNull ServerboundContainerClickPacket withContainerId(int containerId)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withStateId

      public @NonNull ServerboundContainerClickPacket withStateId(int stateId)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withSlot

      public @NonNull ServerboundContainerClickPacket withSlot(int slot)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withAction

      public @NonNull ServerboundContainerClickPacket withAction(@NonNull @NonNull ContainerActionType action)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withParam

      public @NonNull ServerboundContainerClickPacket withParam(@NonNull @NonNull ContainerAction param)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withCarriedItem

      public @NonNull ServerboundContainerClickPacket withCarriedItem(@Nullable ItemStack carriedItem)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withChangedSlots

      public @NonNull ServerboundContainerClickPacket withChangedSlots(@NonNull @NonNull it.unimi.dsi.fastutil.ints.Int2ObjectMap<@Nullable ItemStack> changedSlots)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).