minecraft:behavior.go_and_give_items_to_owner for you with a switch.Get GodCraftOverview
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
| Field | Type | Default | Description |
|---|---|---|---|
run_speed | number | 1 | Speed while running to the owner. |
reach_mob_distance | number | 3 | How close the mob gets before giving the items. |
throw_force | number | 0.2 | How hard the items are thrown. |
vertical_throw_mul | number | 1.5 | Extra multiplier for the upward part of the throw. |
throw_sound | LevelSoundEvent | "charge" | Sound played when the mob throws an item. |
on_item_throw | ActorDefinitionTrigger[] | none | Events that fire when the mob throws items. |
priority | integer | 0 | Lower numbers run first: when two goals compete, the one with the smaller priority wins.Range: 0 to … |
control_flags | Goal's control flags[] | none | Which 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": []
}
}