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

minecraft:peek

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

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

FieldTypeDefaultDescription
on_closeStringnoneEvent to run when the entity stops peeking and closes.
on_openStringnoneEvent to run when the entity starts peeking.
on_target_openStringnoneEvent 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": ""
  }
}

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