minecraft:block_sensor

Dynamic value

Properties

This component has no properties in the official schema: add it as an empty object {} to switch the behaviour on.

Example from the game files

This is how vanilla Bee uses it in Minecraft Bedrock 1.26.60.5:

{
  "minecraft:block_sensor": {
    "sensor_radius": 16,
    "sources": [
      {
        "test": "has_silk_touch",
        "subject": "other",
        "value": false
      }
    ],
    "on_break": [
      {
        "block_list": [
          "minecraft:beehive",
          "minecraft:bee_nest"
        ],
        "on_block_broken": "hive_destroyed"
      }
    ]
  }
}

Used by 2

Vanilla entities with minecraft:block_sensor in their definition:

Related components