Saltar al contenido principal

Input Trigger Config

Player Input Triggers Configuration

Configuration entry for InputTrigger extension. Contains a list of input definitions and inventory buttons.

Campos

CampoTipoPredeterminadoDescripción
keybindsList<InputDefinition>emptyInput trigger definitions for triggering actions on player input
InputDefinition (9)
CampoTipoPredeterminadoDescripción
typeInputTypeSWAP_HANDThe input type to listen for
enabledBooleanfalseEnable or disable this input handler
cancelActionBooleanfalseIf true, the original game action is cancelled
actionsList<Ref<ActionEntry>>emptyActions to execute when the input is triggered
delayLong0Delay in ticks before executing actions (0 = instant)
cooldownLong0Cooldown in ticks between consecutive triggers of this same binding (0 = no cooldown)
dropCountInt1For DROP: number of items to drop. 1 = single item, -1 = full stack, >1 = custom count
hotbarSlotInt0For HOTBAR_SLOT: the slot index (0-8) that triggers this definition
criteriaList<Criteria>emptyCriteria that must be met for this input trigger to fire
inventoryButtonsList<InventoryButton>emptyClickable buttons in the player inventory or crafting grid
InventoryButton (6)
CampoTipoPredeterminadoDescripción
slotInt0Slot in the inventory (0-40 for player inventory, 0-4 for crafting grid)
itemVar<Item>—The item to display as the button
clickActionsList<ClickActionBinding>emptyActions mapped by click type
ClickActionBinding (3)
CampoTipoPredeterminadoDescripción
clickTypeClickTypeLEFTThe click type that triggers these actions
actionsList<Ref<ActionEntry>>emptyActions to execute when this click type is used
criteriaList<Criteria>emptyCriteria that must be met for this binding to fire
delayLong0Delay in ticks before executing actions
isCraftingGridBooleanfalseIf true, this button is placed in the 2x2 crafting grid
criteriaList<Criteria>emptyGlobal criteria that must be met for this button to appear and be clickable

How to use it​

Create one entry of this type; only the first one found is read. It holds two lists.

  • keybinds: one definition per input type. Only the first definition of each type is used. Tick enabled, because it is off by default. See the main page for the exact meaning of each input and of cancelAction, delay, cooldown and dropCount.
  • inventoryButtons: items pinned to a slot. For each button, clickActions maps a clickType (LEFT, RIGHT, SHIFT_LEFT, SHIFT_RIGHT, DROP, DOUBLE_CLICK, or ALL as a fallback) to the actions to run, with optional criteria. isCraftingGrid places the button in the 2x2 crafting grid, where slot 0 is the result slot.

The actions fields only accept action entries. A button replaces the item in its slot, and a player carrying a button cannot die.