Actions v3 - RealMegaMinds/ActionInventoryMod GitHub Wiki

Actions

Actions are what slot elements execute. There are many types of actions:

Types

Actions look like:

{
  "type": "",
  "requiredIndex": 0,
  "requiredClickType": "",
  "requiredSlotActionType": "",
  "requiredGuiName": "",
  "requireShift": false,
  "requiredRecipe": "",
  ...other fields...
}

Type (required)

This is the type of the action. This is a string.

Types
  • "AnvilStore"
  • "CloseGui"
  • "Command"
  • "Consume"
  • "Empty"
  • "Give"
  • "Group"
  • "Message"
  • "OpenGui"
  • "Require"
  • "SendProperty"
  • "Sound"

Required Index (optional)

When a slot element is clicked, only executes this action if the slot element is in this index. This is an integer.

Required Click Type (optional)

When a slot element is clicked, only executes this action if the click was of this type. This is a string.

Types
  • "MOUSE_LEFT"
  • "MOUSE_RIGHT"
  • "MOUSE_LEFT_SHIFT"
  • "MOUSE_RIGHT_SHIFT"
  • "NUM_KEY_1"
  • "NUM_KEY_2"
  • "NUM_KEY_3"
  • "NUM_KEY_4"
  • "NUM_KEY_5"
  • "NUM_KEY_6"
  • "NUM_KEY_7"
  • "NUM_KEY_8"
  • "NUM_KEY_9"
  • "MOUSE_MIDDLE"
  • "DROP"
  • "CTRL_DROP"
  • "MOUSE_LEFT_OUTSIDE"
  • "MOUSE_RIGHT_OUTSIDE"
  • "MOUSE_LEFT_DRAG_START"
  • "MOUSE_RIGHT_DRAG_START"
  • "MOUSE_MIDDLE_DRAG_START"
  • "MOUSE_LEFT_DRAG_ADD"
  • "MOUSE_RIGHT_DRAG_ADD"
  • "MOUSE_MIDDLE_DRAG_ADD"
  • "MOUSE_LEFT_DRAG_END"
  • "MOUSE_RIGHT_DRAG_END"
  • "MOUSE_MIDDLE_DRAG_END"
  • "MOUSE_DOUBLE_CLICK"
  • "UNKNOWN"
  • "OFFHAND_SWAP"

Required Slot Action Type (optional)

When a slot element is clicked, only executes this action if the click was of this action. This is a string.

Types
  • "PICKUP"
  • "QUICK_MOVE"
  • "SWAP"
  • "CLONE"
  • "THROW"
  • "QUICK_CRAFT"
  • "PICKUP_ALL"

Required Gui Name (optional)

When a slot element is clicked, only executes this action if the slot element is in a gui of this name. This is an identifier. See Common Types v3.

Require Shift (optional) Added: 3.1

The action is only executed if the person was holding shift when they clicked. This is a boolean.

Required Recipe (optional) Added: 3.1

The action is only executed if the person clicked the specified recipe. This is an identifier. See Common Types v3.

Note

Require shift and required recipe are only used for recipe actions in an Action Inventory. Other fields are only used for any click action in an Action Inventory and element actions. None of these fields are used for open and close actions in an Action Inventory.

⚠️ **GitHub.com Fallback** ⚠️