Move To Block¶
文档版本:1.21.50.25
Allows mob to move towards a block.
架构¶
move_to_block:
{
priority "priority"
number "goal_radius" : opt
trigger "on_stay_completed"
trigger "on_reach"
number "start_chance" : opt
integer "search_range" : opt
integer "search_height" : opt
number "stay_duration" : opt
string "target_selection_method" : opt
array "target_offset" : opt
{
number "0..0" : opt
number "1..1" : opt
number "2..2" : opt
}
array "target_blocks" : opt
{
descriptor "<any array element>"
}
filters "target_block_filters"
integer "tick_interval" : opt
}
priority:priority
goal_radius:number- Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
on_stay_completed:trigger- Event to run on completing a stay of stay_duration at the block.
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>on_reach:trigger- Event to run on block reached.
start_chance:number- Chance to start the behavior (applied after each random tick_interval).
search_range:integer- The distance in blocks that the mob will look for the block.
search_height:integer- The height in blocks that the mob will look for the block.
stay_duration:number- Number of ticks needed to complete a stay at the block.
target_selection_method:string- Kind of block to find fitting the specification. Valid values are "random" and "nearest".
target_offset:array- Offset to add to the selected target position.
target_offset0..0:number
1..1:number
2..2:number
target_blocks:array- Block types to move to.
target_blocks<any array element>:descriptor
item:identifier
item:object- An object that describes an item.
itemtags:0- [UNDOCUMENTED] A Molang expression ran against item or block to match.
item_tag:string- [UNDOCUMENTED] A tag to lookup item or block by.
target_block_filters:filters- 一个过滤器组。Filters to apply on the target blocks. Target blocks are only valid if the filters are true.
tick_interval:integer- Average interval in ticks to try to run this behavior.