跳转至

Go And Give Items To Noteblock

文档版本:1.21.0.24

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

架构

go_and_give_items_to_noteblock:
{
  priority "priority"
  integer "listen_time" : opt
  trigger "on_item_throw"
  number "reach_block_distance" : opt
  number "run_speed" : opt
  number "throw_force" : opt
  sound_event "throw_sound"
  number "vertical_throw_mul" : opt
}
prioritypriority
priority:
integer
listen_timeinteger
Sets the time an entity should continue delivering items to a noteblock after hearing it.
on_item_throwtrigger
Event(s) to run when this mob throws items.
trigger:
string
trigger:
{
  string "event" : opt
  filters "filters"
  subject "target"
}
eventstring
The event to run when the conditions for this trigger are met.
filtersfilters
一个过滤器组。The list of conditions for this trigger to execute.
targetsubject
The target of the event.
subject:
string
trigger:
array
{
  object "<any array element>" : opt
  {
    string "event" : opt
    filters "filters"
    subject "target"
  }
}
<any array element>object
<any array element>
reach_block_distancenumber
Sets the desired distance to be reached before throwing the items towards the block.
run_speednumber
Sets the entity's speed when running toward the block.
throw_forcenumber
Sets the throw force.
throw_soundsound_event
Sound to play when this mob throws an item.
sound_event:
string
vertical_throw_mulnumber
Sets the vertical throw multiplier that is applied on top of the throw force in the vertical direction.