minecraft:behavior.stay_near_noteblock

The entity will attempt to toss the items from its inventory to a nearby recently played noteblock.

Properties

PropertyTypeDefaultWhat it does
speedDecimal1Sets the entity's speed when moving toward the block.
start_distanceDecimal10Sets the distance the entity needs to be away from the block to attempt to start the goal.
stop_distanceDecimal2Sets the distance from the block the entity will attempt to reach.
listen_timeInteger30Sets the time an entity should stay near a noteblock after hearing it.
priorityIntegermin 00
control_flagsList 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