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

minecraft:behavior.go_and_give_items_to_noteblock

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

Overview

minecraft:behavior.go_and_give_items_to_noteblock 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 run to a note block that was just played and toss its items next to it, like an allay.

Fields

FieldTypeDefaultDescription
run_speednumber1Speed while running to the note block.
reach_block_distancenumber3How close the mob gets before throwing the items.
listen_timeinteger30How long the mob keeps bringing items after hearing the note block.
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_noteblock": {
    "run_speed": 1,
    "reach_block_distance": 3,
    "listen_time": 30,
    "throw_force": 0.2,
    "vertical_throw_mul": 1.5,
    "throw_sound": "charge",
    "on_item_throw": [],
    "priority": 0
  }
}

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