1. Wiki
  2. /Entities
  3. /minecraft:admire_item

minecraft:admire_item

Don't want to write this by hand? GodCraft sets minecraft:admire_item for you with a switch.Get GodCraft

Overview

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

FieldTypeDefaultDescription
durationinteger10How many seconds the mob keeps admiring the item.
cooldown_after_being_attackedinteger10Seconds 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
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more