On Customblock Interact Event
Triggers when a custom block is interacted with
字段
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
blockId | String | — | The custom block ID that triggers this event (e.g., 'namespace:block_id'). Leave empty for any custom block. |
action | ItemsAdderInteractAction | ANY | Which click triggers this event.可选值:ANYLEFT_CLICKRIGHT_CLICK |
location | Optional<Var<Position>> | — | The location where the block was interacted with (optional) |
TypeWriter 通用字段(triggers)
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
triggers | List<Ref<TriggerableEntry>> | empty | — |
How to use it
action filters the click: ANY, LEFT_CLICK or RIGHT_CLICK. The triggered entries receive the block id, its position, the click and the id of the item in hand. The furniture interact event does not have an action field, because ItemsAdder does not report the click on that event.