minecraft:behavior.sniff
Allows this entity to detect the nearest player within "sniffing_radius" and update its "minecraft:suspect_tracking" component state
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
duration | Decimal | 1 | Sniffing duration in seconds |
sniffing_radius | Decimal | 5 | Mob detection radius |
suspicion_radius_horizontal | Decimal | 3 | Mob suspicion horizontal radius. When a player is within this radius horizontally, the anger level towards that player is increased |
suspicion_radius_vertical | Decimalmin 1 | 3 | Mob suspicion vertical radius. When a player is within this radius vertically, the anger level towards that player is increased |
cooldown_range | Object | {"max": 10, "min": 3} | Cooldown range between sniffs in seconds |
min | Decimal | 0 | |
max | Decimal | 0 | |
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.sniff": {
"duration": 4.16,
"sniffing_radius": 24,
"suspicion_radius_horizontal": 6,
"suspicion_radius_vertical": 20,
"cooldown_range": {
"min": 5,
"max": 10
},
"priority": 6
}
}Used by 1
Vanilla entities with minecraft:behavior.sniff in their definition:
Related components
behavior.random_strollbehavior.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_friends