minecraft:behavior.look_at_trading_player
Allows the mob to look at the player they are trading with.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
angle_of_view_vertical | Integer0 to 360 | 360 | The angle in degrees that the mob can see rotated on the X-axis (up-down). |
angle_of_view_horizontal | Integer0 to 360 | 360 | The angle in degrees that the mob can see rotated on the Y-axis (left-right). |
look_time | Object | {"max": 4, "min": 2} | Time range to look at the nearest entity. |
min | Decimal | 0 | |
max | Decimal | 0 | |
look_distance | Decimalmin 0 | 8 | The distance in blocks from which the entity will look at the nearest entity. |
probability | Decimal0 to 1 | 0.02 | The probability of looking at the target. A value of 1.00 is 100%. |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Villager uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.look_at_trading_player": {
"look_time": {
"min": 1,
"max": 2
},
"priority": 2
}
}Used by 3
Vanilla entities with minecraft:behavior.look_at_trading_player in their definition:
Related components
behavior.look_at_playerbehavior.temptbehavior.breedbehavior.mount_pathingbehavior.follow_parentbehavior.player_ride_tamedbehavior.find_mountbehavior.celebratebehavior.follow_ownerbehavior.stay_while_sittingbehavior.random_look_around_and_sitbehavior.take_flowerbehavior.trade_with_playerbehavior.celebrate_survivebehavior.controlled_by_playerbehavior.follow_caravanbehavior.follow_mobbehavior.make_lovebehavior.ocelot_sit_on_blockbehavior.playbehavior.receive_lovebehavior.share_itemsbehavior.trade_interestbehavior.admire_item