Interface InventoryAction

All Known Implementing Classes:
ClickItem, CloseContainer, ContainerButtonClick, DropItem, DropMouseStack, MoveToHotbarSlot, PlaceRecipe, SelectTrade, SetHeldItem, ShiftClick, WaitAction

public interface InventoryAction
Interface for an inventory action submitted through the InventoryManager Each action is associated with an expected container id. If the container is not open at the time which the action is to be executed, it is skipped. InventoryActions return a packet that is lazily constructed at action execution time. Meaning the action will reference up-to-date inventory cache data. Actions can return a null packet to indicate that the action should be skipped.
  • Method Details

    • containerId

      int containerId()
    • packet

      @Nullable MinecraftPacket packet()
    • isStackEmpty

      default boolean isStackEmpty(ItemStack stack)