minecraft:behavior.go_and_give_items_to_owner

The entity will attempt to toss the items from its inventory to its owner.

Properties

PropertyTypeDefaultWhat it does
run_speedDecimal1Sets the entity's speed when running toward the owner.
reach_mob_distanceDecimal3Sets the desired distance to be reached before giving items to owner.
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_owner": {
    "on_item_throw": [
      {
        "event": "pickup_item_delay",
        "target": "self"
      }
    ],
    "priority": 4,
    "run_speed": 8,
    "throw_sound": "item_thrown"
  }
}

Used by 1

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

Related components