minecraft:giveable for you with a switch.Get GodCraftOverview
minecraft:giveable is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets players hand certain items to the entity, which takes the item into its inventory and fires an event.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
cooldown | Decimal | "0.0" | Seconds to wait between gifts, to stop spam clicking. |
items | List | none | Items the entity accepts. |
on_give | String | none | Event fired when a correct item is given. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:giveable": {
"cooldown": "0.0",
"items": {},
"on_give": ""
}
}