Drop Item For¶
文档版本:1.21.50.25
Allows the entity to move toward a target, and drop an item near the target. This goal requires a "minecraft:navigation" to execute.
架构¶
drop_item_for:
{
priority "priority"
speed_multiplier "speed_multiplier"
entity_types "entity_types"
number "cooldown" : opt
number "drop_item_chance" : opt
number "goal_radius" : opt
string "loot_table" : opt
number "max_head_look_at_height" : opt
number "minimum_teleport_distance" : opt
number "offering_distance" : opt
trigger "on_drop_attempt"
integer "search_count" : opt
integer "search_height" : opt
integer "search_range" : opt
number "seconds_before_pickup" : opt
vector_of_3_items "target_range"
vector_of_3_items "teleport_offset"
range_number_type "time_of_day_range"
}
priority
:priority
speed_multiplier
:speed_multiplier
entity_types
:entity_types- The list of conditions another entity must meet to be a valid target to drop an item for.
entity_types:
array
{
object "<any array element>" : opt
{
filters "filters"
number "cooldown" : opt
number "max_dist" : opt
number "max_height" : opt
number "max_flee" : opt
number "priority" : opt
number "within_default" : opt
boolean "check_if_outnumbered" : opt
boolean "must_see" : opt
number "must_see_forget_duration" : opt
boolean "reevaluate_description" : opt
number "sprint_speed_multiplier" : opt
number "walk_speed_multiplier" : opt
}
}
<any array element>
:object- The entity type.
<any array element>
filters
:filters- 一个过滤器组。
cooldown
:number- The amount of time in seconds that the mob has to wait before selecting a target of the same type again
max_dist
:number- Maximum distance this mob can be away to be a valid choice.
max_height
:number- UNDOCUMENTED.
max_flee
:number- UNDOCUMENTED.
priority
:number- UNDOCUMENTED.
within_default
:number- UNDOCUMENTED.
check_if_outnumbered
:boolean- UNDOCUMENTED.
must_see
:boolean- If true, the mob has to be visible to be a valid choice.
must_see_forget_duration
:number- Determines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more.
reevaluate_description
:boolean- If true, the mob will stop being targeted if it stops meeting any conditions.
sprint_speed_multiplier
:number- Multiplier for the running speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier
:number- Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
entity_types:
{
filters "filters"
number "cooldown" : opt
number "max_dist" : opt
number "max_height" : opt
number "max_flee" : opt
number "priority" : opt
number "within_default" : opt
boolean "check_if_outnumbered" : opt
boolean "must_see" : opt
number "must_see_forget_duration" : opt
boolean "reevaluate_description" : opt
number "sprint_speed_multiplier" : opt
number "walk_speed_multiplier" : opt
}
cooldown
:number- Total time that the goal is on cooldown before it can be used again.
drop_item_chance
:number- The percent chance the entity will drop an item when using this goal.
goal_radius
:number- Distance in blocks within the entity considers it has reached it's target position.
loot_table
:string- The loot table that contains the possible loot the entity can drop with this goal.
max_head_look_at_height
:number- The maximum height the entities head will look at when dropping the item. The entity will always be looking at its target.
minimum_teleport_distance
:number- If the target position is farther away than this distance on any tick, the entity will teleport to the target position.
offering_distance
:number- The preferred distance the entity tries to be from the target it is dropping an item for.
on_drop_attempt
:trigger- The event to trigger when the entity attempts to drop an item.
event
:string- The event to run when the conditions for this trigger are met.
filters
:filters- 一个过滤器组。The list of conditions for this trigger to execute.
target
:subject- The target of the event.
trigger:
array
{
object "<any array element>" : opt
{
string "event" : opt
filters "filters"
subject "target"
}
}
<any array element>
:object
<any array element>
search_count
:integer- The number of blocks each tick that the entity will check within its search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick.
search_height
:integer- The Height in blocks the entity will search within to find a valid target position.
search_range
:integer- The distance in blocks the entity will search within to find a valid target position.
seconds_before_pickup
:number- The numbers of seconds that will pass before the dropped entity can be picked up from the ground.
target_range
:vector_of_3_items- The range in blocks within which the entity searches to find a target to drop an item for.
0..0
:number- The X component.
1..1
:number- The Y component.
2..2
:number- The Z component.
teleport_offset
:vector_of_3_items- When the entity teleports, offset the teleport position by this many blocks in the X, Y, and Z coordinate.
time_of_day_range
:range_number_type- The valid times of day that this goal can be used. For reference: noon is 0.0, sunset is 0.25, midnight is 0.5, and sunrise is 0.75, and back to noon for 1.0.
0..0
:number- The first value of the range.
1..1
:number- The second value of the range.
range_min
:number- The minimum value of the range.
range_max
:number- The maximum value of the range.