minecraft:behavior.random_stroll
Allows a mob to randomly stroll around.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
speed_multiplier | Decimal | 1 | Movement speed multiplier of the mob when using this AI Goal |
xz_dist | Integer | 10 | Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1 |
y_dist | Integer | 7 | Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1 |
interval | Integer | 120 | A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Rabbit uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.random_stroll": {
"priority": 6,
"speed_multiplier": 0.6,
"xz_dist": 2,
"y_dist": 1
}
}Used by 64
Vanilla entities with minecraft:behavior.random_stroll in their definition:
ArmadilloAxolotlBlazeBoggedBreezeCamelCamel HuskCatCave SpiderChickenCopper GolemCowCreakingCreeperDonkeyDrownedEndermanEndermiteEvokerFoxFrogGoatHoglinHorseHuskIron GolemLlamaMooshroomMuleOcelotPandaParchedPigPiglinPiglin BrutePillagerPolar BearRabbitRavagerSheepSkeletonSkeleton HorseSnifferSnow GolemSpiderStrayStriderTrader LlamaTurtleVillagerVillagerVindicatorWandering TraderWardenWitchWitherWither SkeletonWolfZoglinZombieZombie HorseZombified PiglinZombie VillagerZombie Villager
Related components
behavior.random_look_aroundbehavior.equip_itembehavior.move_towards_home_restrictionbehavior.timer_flag_1behavior.look_at_entitybehavior.move_towards_dwelling_restrictionbehavior.drink_potionbehavior.jump_to_blockbehavior.squid_divebehavior.squid_idlebehavior.squid_move_away_from_groundbehavior.squid_out_of_waterbehavior.croakbehavior.dragondeathbehavior.drink_milkbehavior.emergebehavior.investigate_suspicious_locationbehavior.lay_downbehavior.napbehavior.rise_to_liquid_levelbehavior.rollbehavior.silverfish_merge_with_stonebehavior.silverfish_wake_up_friendsbehavior.sleep