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, ContainerActionType action, ContainerAction param, @Nullable HashedStack carriedItem, Map<Integer,@Nullable HashedStack> changedSlots)
    • ServerboundContainerClickPacket

      public ServerboundContainerClickPacket(int containerId, int stateId, int slot, ContainerActionType action, ContainerAction param, @Nullable HashedStack carriedItem, it.unimi.dsi.fastutil.ints.Int2ObjectMap<@Nullable HashedStack> 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

      public ContainerActionType getAction()
    • getParam

      public ContainerAction getParam()
    • getCarriedItem

      public @Nullable HashedStack getCarriedItem()
    • getChangedSlots

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

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

      protected boolean canEqual(Object other)
    • hashCode

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

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

      public 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 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 ServerboundContainerClickPacket withSlot(int slot)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withAction

      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withParam

      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withCarriedItem

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

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