minecraft:behavior.controlled_by_player
Allows the entity to be controlled by a player which is holding the item specified in "minecraft:item_controllable" component's "control_items" field (required). Also requires the "minecraft:movement" component, and the "minecraft:rideable" component. On every tick, the entity will attempt to rotate towards where the player is facing with the control item whilst simultaneously moving forward.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
fractional_rotation | Decimal0.5 to 1 | 0.5 | The entity will attempt to rotate to face where the player is facing each tick. The entity will target this percentage of their difference in their current facing angles each tick (from 0.0 to 1.0 where 1.0 = 100%). This is limited by "fractional_rotation_limit". A value of 0.0 will result in the entity no longer turning to where the player is facing. |
fractional_rotation_limit | Decimal | 5 | Limits the total degrees the entity can rotate to face where the player is facing on each tick. |
mount_speed_multiplier | Decimal | 1 | Speed multiplier of mount when controlled by player. |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Strider uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.controlled_by_player": {
"priority": 0,
"mount_speed_multiplier": 1.45
}
}Used by 2
Vanilla entities with minecraft:behavior.controlled_by_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.look_at_trading_playerbehavior.random_look_around_and_sitbehavior.take_flowerbehavior.trade_with_playerbehavior.celebrate_survivebehavior.follow_caravanbehavior.follow_mobbehavior.make_lovebehavior.ocelot_sit_on_blockbehavior.playbehavior.receive_lovebehavior.share_itemsbehavior.trade_interestbehavior.admire_item