minecraft:admire_item for you with a switch.Get GodCraftOverview
minecraft:admire_item is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets the mob stop and stare at an item it likes for a while, ignoring targets it could attack. Piglins use this with gold.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
duration | integer | 10 | How many seconds the mob keeps admiring the item. |
cooldown_after_being_attacked | integer | 10 | Seconds after getting hurt during which the mob refuses to admire items. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:admire_item": {
"duration": 10,
"cooldown_after_being_attacked": 10
}
}