跳转至

Inside Block Notifier

文档版本:1.21.0.24

Verifies whether the entity is inside any of the listed blocks.

架构

inside_block_notifier:
{
  array "block_list" : opt
  {
    object "<any array element>" : opt
    {
      block "block"
      event_object "entered_block_event"
      event_object "exited_block_event"
    }
  }
}
block_listarray
List of blocks, with certain block states, that we are monitoring to see if the entity is inside.
block_list
<any array element>object
A of block, with certain block states, that we are monitoring to see if the entity is inside.
<any array element>
blockblock
block:
{
  string "name" : opt
  object "states" : opt
  {
    string "<any object property>" : opt
    boolean "<any object property>" : opt
    number "<any object property>" : opt
  }
}
namestring
The block id, for example: `minecraft:air'.
statesobject
The block states.
states
<any object property>string
A single state of a block.
<any object property>boolean
A single state of a block.
<any object property>number
A single state of a block.
entered_block_eventevent_object
Event to run when this mob enters a valid block.
event_object:
{
  filters "filters"
  string "event" : opt
  string "target" : opt
}
filtersfilters
一个过滤器组
eventstring
The event to fire.
targetstring
The target of the event.
exited_block_eventevent_object
Event to run when this mob leaves a valid block.