minecraft:behavior.admire_item for you with a switch.Get GodCraftOverview
minecraft:behavior.admire_item is an entity component: it goes in the components object of a custom mob, or in one of its component groups. AI goal that makes the mob hold up and look at an item it likes. It needs the minecraft:admire_item component to work.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
admire_item_sound | string | "" | Sound event played while the mob is admiring. |
sound_interval | FloatRange | {"max":0,"min":0} | Random wait range in seconds between admiring sounds. |
on_admire_item_start | ActorDefinitionTrigger | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Event that fires when the mob begins admiring. |
on_admire_item_stop | ActorDefinitionTrigger | {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} | Event that fires when the mob stops admiring. |
priority | integer | 0 | Lower numbers run first: when two goals compete, the one with the smaller priority wins.Range: 0 to … |
control_flags | Goal's control flags[] | none | Which body parts this goal takes over (move, look, jump), so goals using the same parts cannot run together. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:behavior.admire_item": {
"admire_item_sound": "",
"sound_interval": {
"max": 0,
"min": 0
},
"on_admire_item_start": {
"event": "",
"filters": {
"AND": null,
"NOT": null,
"OR": null,
"all": null,
"all_of": null,
"any": null,
"any_of": null,
"none_of": null
},
"target": "self"
},
"on_admire_item_stop": {
"event": "",
"filters": {
"AND": null,
"NOT": null,
"OR": null,
"all": null,
"all_of": null,
"any": null,
"any_of": null,
"none_of": null
},
"target": "self"
},
"priority": 0,
"control_flags": []
}
}