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, MinecraftCodecHelper helper)
  • Method Details

    • serialize

      public void serialize(io.netty.buffer.ByteBuf out, MinecraftCodecHelper helper)
      Specified by:
      serialize in interface MinecraftPacket
    • 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).