Overview
minecraft:peek is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets the entity peek open and closed, like a shulker opening its shell, and runs events at each step.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
on_close | String | none | Event to run when the entity stops peeking and closes. |
on_open | String | none | Event to run when the entity starts peeking. |
on_target_open | String | none | Event to run when the entity's target starts peeking. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:peek": {
"on_close": "",
"on_open": "",
"on_target_open": ""
}
}