minecraft:behavior.move_to_random_block
Allows mob to move towards a random block.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
speed_multiplier | Decimal | 1 | Movement speed multiplier of the mob when using this AI Goal |
within_radius | Decimal | 0 | Defines the distance in blocks the mob has to be from the block for the movement to be finished. |
block_distance | Decimal | 16 | Defines the distance from the mob, in blocks, that the block to move to will be chosen. |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Pillager uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.move_to_random_block": {
"block_distance": 512,
"priority": 6,
"speed_multiplier": 0.55,
"within_radius": 8
}
}Used by 2
Vanilla entities with minecraft:behavior.move_to_random_block in their definition:
Related components
behavior.floatbehavior.random_swimbehavior.swim_idlebehavior.swim_wanderbehavior.use_kinetic_weaponbehavior.move_to_waterbehavior.teleport_to_ownerbehavior.float_wanderbehavior.go_homebehavior.random_hoverbehavior.slime_floatbehavior.slime_keep_on_jumpingbehavior.slime_random_directionbehavior.move_to_landbehavior.circle_around_anchorbehavior.dragonholdingpatternbehavior.dragonlandingbehavior.dragontakeoffbehavior.explore_outskirtsbehavior.find_underwater_treasurebehavior.move_to_blockbehavior.move_to_liquidbehavior.random_breachbehavior.random_fly