1. Wiki
  2. /Entities
  3. /minecraft:behavior.go_and_give_items_to_owner

minecraft:behavior.go_and_give_items_to_owner

Don't want to write this by hand? GodCraft sets minecraft:behavior.go_and_give_items_to_owner for you with a switch.Get GodCraft

Overview

minecraft:behavior.go_and_give_items_to_owner is an entity component: it goes in the components object of a custom mob, or in one of its component groups. AI goal that makes the mob bring the items it carries back to its owner and toss them over, like an allay.

Fields

FieldTypeDefaultDescription
run_speednumber1Speed while running to the owner.
reach_mob_distancenumber3How close the mob gets before giving the items.
throw_forcenumber0.2How hard the items are thrown.
vertical_throw_mulnumber1.5Extra multiplier for the upward part of the throw.
throw_soundLevelSoundEvent"charge"Sound played when the mob throws an item.
on_item_throwActorDefinitionTrigger[]noneEvents that fire when the mob throws items.
priorityinteger0Lower numbers run first: when two goals compete, the one with the smaller priority wins.Range: 0 to …
control_flagsGoal's control flags[]noneWhich body parts this goal takes over (move, look, jump), so goals using the same parts cannot run together.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:behavior.go_and_give_items_to_owner": {
    "run_speed": 1,
    "reach_mob_distance": 3,
    "throw_force": 0.2,
    "vertical_throw_mul": 1.5,
    "throw_sound": "charge",
    "on_item_throw": [],
    "priority": 0,
    "control_flags": []
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more