跳转至

Block Sensor

文档版本:1.21.0.24

Fires off a specified event when a block in the block list is broken within the sensor range.

架构

block_sensor:
{
  integer "sensor_radius" : opt
  array "on_break" : opt
  {
    object "<any array element>" : opt
    {
      array "block_list" : opt
      {
        identifier "<any array element>"
      }
      string "on_block_broken" : opt
    }
  }
  array "sources" : opt
  {
    filters "<any array element>"
  }
}
sensor_radiusinteger
The maximum radial distance in which a specified block can be detected. The biggest radius is 32.0.
on_breakarray
Blocks that will trigger the component when broken and what event will trigger.
on_break
<any array element>object
Event to run when a block breaks.
<any array element>
block_listarray
List of blocks that will trigger the sensor.
block_list
<any array element>identifier
identifier:
string
on_block_brokenstring
Event to run when a block breaks.
sourcesarray
List of sources that break the block to listen for. If none are specified, all block breaks will be detected.
sources
<any array element>filters
一个过滤器组