minecraft:behavior.dig
Allows this entity to dig into the ground before despawning.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
duration | Decimal | 0 | Goal duration in seconds |
idle_time | Decimal | 0 | The minimum idle time in seconds between the last detected disturbance to the start of digging. |
allow_dig_when_named | Boolean | false | If true, this behavior can run when this entity is named. Otherwise not. |
vibration_is_disturbance | Boolean | false | If true, vibrations count as disturbances that may delay the start of this goal. |
suspicion_is_disturbance | Boolean | false | If true, finding new suspicious locations count as disturbances that may delay the start of this goal. |
digs_in_daylight | Boolean | false | Indicates that the actor should start digging when it sees daylight |
on_start | Object | {"event": "", "filters": {"AND": null, "NOT": null, "OR":… | Event(s) to run when the goal starts. |
event | Text | "" | |
target | Textself, other, player, target, parent, baby, block, damager, holder, item | "self" | |
filters | Object 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. |
test | Text | — | The name of the test to apply. |
subject | Boolean or Integer or Decimal or Text | — | The subject of this filter test. |
operator | Boolean or Integer or Decimal or Text | — | The comparison to apply with 'value'. |
domain | Boolean or Integer or Decimal or Text | — | The domain the test should be performed in. |
value | Boolean or Integer or Decimal or Text | — | The value being compared with the test. |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Warden uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.dig": {
"duration": 5.5,
"idle_time": 60,
"vibration_is_disturbance": true,
"suspicion_is_disturbance": true,
"on_start": {
"event": "on_digging_event"
},
"priority": 1
}
}Used by 1
Vanilla entities with minecraft:behavior.dig in their definition:
Related components
behavior.pickup_itemsbehavior.move_to_villagebehavior.harvest_farm_blockbehavior.lay_eggbehavior.move_indoorsbehavior.move_outdoorsbehavior.place_blockbehavior.raid_gardenbehavior.dragonscanningbehavior.drop_item_forbehavior.eat_blockbehavior.eat_carried_itembehavior.eat_mobbehavior.fertilize_farm_blockbehavior.hold_groundbehavior.inspect_bookshelfbehavior.move_through_villagebehavior.open_doorbehavior.random_search_and_digbehavior.restrict_open_doorbehavior.snackingbehavior.stroll_towards_villagebehavior.take_blockbehavior.transport_items