-
Notifications
You must be signed in to change notification settings - Fork 0
cu_define_item_use en
mouse114514 edited this page Sep 12, 2026
·
1 revision

Defines the "use" behavior for a specific custom item. When the player uses that item, the connected blocks below run. Each item can have only one such behavior block.
This is the only kind of hat block that carries a slot: it has one item slot (ITEM) that selects which item this behavior belongs to.
| Slot | Type | Description |
|---|---|---|
| ITEM | Item slot | The item this use behavior is bound to. Fill with a custom item or item value block |
| Connection | Type | Description |
|---|---|---|
| Top | - | hat block, cannot connect |
| Bottom | Statement | blocks that run when the player uses this item (eat, drink, talk, etc.) |
- Custom food: restore hunger and gain weight on use
- Custom medicine: heal or clear negative status on use
- Custom tool: play a sound and consume the item on use
Emits a //ITEM_USE_ACTION:<itemID> … //END_ITEM_USE_ACTION section that binds the code to the item's useAction delegate.
when customFood item used
├── eat hunger 15 weight gain 0.3
├── set happiness to player happiness + 5
└── talk "Delicious!"
Block ID: cu_define_item_use