跳转至

Preferred Path

文档版本:1.21.0.24

Specifies costing information for mobs that prefer to walk on preferred paths.

架构

preferred_path:
{
  number "default_block_cost" : opt
  integer "jump_cost" : opt
  integer "max_fall_blocks" : opt
  array "preferred_path_blocks" : opt
  {
    object "<any array element>" : opt
    {
      number "cost" : opt
      array "blocks" : opt
      {
        reference "<any array element>"
      }
    }
  }
}
default_block_costnumber
Cost for non-preferred blocks.
jump_costinteger
Added cost for jumping up a node.
max_fall_blocksinteger
Distance mob can fall without taking damage.
preferred_path_blocksarray
A list of blocks with their associated cost.
preferred_path_blocks
<any array element>object
Blocks cost.
<any array element>
costnumber
blocksarray
blocks
<any array element>reference
identifier:
string
reference:
{
  identifier "name"
  object "states" : opt
  {
    ['boolean', 'integer', 'string'] "\w*:?\w+" : opt
  }
  0 "tags"
}
nameidentifier
statesobject
states
\w*:?\w+['boolean', 'integer', 'string']
The key of property is the name of the block state/property, the value must be the same as the block properties accepted values.
tags0
A condition using Molang queries that results to true/false that can be used to query for blocks with certain tags.
0:
string