minecraft:behavior.go_and_give_items_to_noteblock

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

Properties

PropertyTypeDefaultWhat it does
run_speedDecimal1Sets the entity's speed when running toward the block.
reach_block_distanceDecimal3Sets the desired distance to be reached before throwing the items towards the block.
listen_timeInteger30Sets the time an entity should continue delivering items to a noteblock after hearing it.
throw_forceDecimal0.2Sets the throw force.
vertical_throw_mulDecimal1.5Sets the vertical throw multiplier that is applied on top of the throw force in the vertical direction.
throw_soundTextitem.use.on, hit, step, step.baby, fly, jump, jump.prevent, break, place, heavy.step, gallop, fall, hurt, hurt.baby, hurt.in.water, death, death.baby, death.in.water, death.to.zombie, ambient, ambient.baby, ambient.in.water, ambient.in.air, ambient.tame …"charge"Sound to play when this mob throws an item.
on_item_throwList of object[]Event(s) to run when this mob throws items.
eventText""
targetTextself, other, player, target, parent, baby, block, damager, holder, item"self"
filtersObject or List of object{"AND": null, "NOT": null, "OR": null, "all": null, "all_…Filters allow data objects to specify test criteria which allows their use. Filters can be defined by a single object of type (Filter Test), an array of tests, collection groups, or a combination of these objects.
testText—The name of the test to apply.
subjectBoolean or Integer or Decimal or Text—The subject of this filter test.
operatorBoolean or Integer or Decimal or Text—The comparison to apply with 'value'.
domainBoolean or Integer or Decimal or Text—The domain the test should be performed in.
valueBoolean or Integer or Decimal or Text—The value being compared with the test.
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.go_and_give_items_to_noteblock": {
    "on_item_throw": [
      {
        "event": "pickup_item_delay",
        "target": "self"
      }
    ],
    "priority": 3,
    "run_speed": 8,
    "throw_sound": "item_thrown"
  }
}

Used by 1

Vanilla entities with minecraft:behavior.go_and_give_items_to_noteblock in their definition:

Related components