minecraft:behavior.stay_near_noteblock
The entity will attempt to toss the items from its inventory to a nearby recently played noteblock.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
speed | Decimal | 1 | Sets the entity's speed when moving toward the block. |
start_distance | Decimal | 10 | Sets the distance the entity needs to be away from the block to attempt to start the goal. |
stop_distance | Decimal | 2 | Sets the distance from the block the entity will attempt to reach. |
listen_time | Integer | 30 | Sets the time an entity should stay near a noteblock after hearing it. |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Allay uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.stay_near_noteblock": {
"speed": 8,
"start_distance": 16,
"stop_distance": 4,
"priority": 5
}
}Used by 1
Vanilla entities with minecraft:behavior.stay_near_noteblock 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.controlled_by_playerbehavior.follow_caravanbehavior.follow_mobbehavior.make_lovebehavior.ocelot_sit_on_blockbehavior.playbehavior.receive_lovebehavior.share_itemsbehavior.trade_interest