minecraft:behavior.take_block

Allows the entity to take a block from the world and carry it around.

Properties

PropertyTypeDefaultWhat it does
blocksList of object or text[]Block descriptors for which blocks are valid to be taken by the entity, if empty all blocks are valid.
can_takeObject or List of object{"AND": null, "NOT": null, "OR": null, "all": null, "all_…Filters for if the entity should try to take a block. Self and Target are set.
testText—The name of the test to apply.
subjectBoolean or Integer or Decimal or Text—The subject of this filter test.
operatorBoolean or Integer or Decimal or Text—The comparison to apply with 'value'.
domainBoolean or Integer or Decimal or Text—The domain the test should be performed in.
valueBoolean or Integer or Decimal or Text—The value being compared with the test.
on_takeObject{"event": "", "filters": {"AND": null, "NOT": null, "OR":…Trigger ran if the entity does take a block. Self, Target, and Block are set.
eventText""
targetTextself, other, player, target, parent, baby, block, damager, holder, item"self"
filtersObject or List of object{"AND": null, "NOT": null, "OR": null, "all": null, "all_…Filters allow data objects to specify test criteria which allows their use. Filters can be defined by a single object of type (Filter Test), an array of tests, collection groups, or a combination of these objects.
testText—The name of the test to apply.
subjectBoolean or Integer or Decimal or Text—The subject of this filter test.
operatorBoolean or Integer or Decimal or Text—The comparison to apply with 'value'.
domainBoolean or Integer or Decimal or Text—The domain the test should be performed in.
valueBoolean or Integer or Decimal or Text—The value being compared with the test.
xz_rangeObject{"max": 2, "min": -2}XZ range from which the entity will try and take blocks from.
minInteger0
maxInteger0
y_rangeObject{"max": 3, "min": 0}Y range from which the entity will try and take blocks from.
minInteger0
maxInteger0
chanceDecimal0 to 11Chance each tick for the entity to try and take a block.
affected_by_griefing_ruleBooleantrueIf true, whether the goal is affected by the mob griefing game rule.
requires_line_of_sightBooleantrueIf true, whether the entity needs line of sight to the block they are trying to take.
priorityIntegermin 00
control_flagsList of text[]

Example from the game files

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

{
  "minecraft:behavior.take_block": {
    "priority": 11,
    "xz_range": {
      "min": -2,
      "max": 2
    },
    "y_range": {
      "min": 0,
      "max": 3
    },
    "chance": 0.05,
    "blocks": [
      "dirt",
      "grass_block",
      "podzol",
      "coarse_dirt",
      "mycelium",
      "dirt_with_roots",
      "moss_block",
      "pale_moss_block",
      "muddy_mangrove_roots",
      "mud",
      "sand",
      "red_sand",
      "gravel",
      "brown_mushroom",
      "red_mushroom",
      "tnt",
      "cactus",
      "cactus_flower",
      "clay",
      "pumpkin",
      "carved_pumpkin",
      "melon_block",
      "crimson_fungus",
      "crimson_nylium",
      "crimson_roots",
      "warped_fungus",
      "warped_nylium",
      "warped_roots",
      "dandelion",
      "open_eyeblossom",
      "closed_eyeblossom",
      "poppy",
      "blue_orchid",
      "allium",
      "azure_bluet",
      "red_tulip",
      "orange_tulip",
      "white_tulip",
      "pink_tulip",
      "oxeye_daisy",
      "cornflower",
      "lily_of_the_valley",
      "wither_rose",
      "torchflower",
      "golden_dandelion"
    ]
  }
}

Used by 1

Vanilla entities with minecraft:behavior.take_block in their definition:

Related components