跳转至

Custom Hit Test

文档版本:1.21.0.24

List of hitboxes for melee and ranged hits against the entity.

架构

custom_hit_test:
{
  array "hitboxes" : opt
  {
    object "<any array element>" : opt
    {
      number "width" : opt
      number "height" : opt
      array "pivot" : opt
      {
        number "0..0" : opt
        number "1..1" : opt
        number "2..2" : opt
      }
    }
  }
}
hitboxesarray
Defines a hitbox size and pivot to test against.
hitboxes
<any array element>object
Defines a hitbox size and pivot to test against.
<any array element>
widthnumber
Height of the hitbox in blocks. A negative value will be assumed to be 0.
heightnumber
Width and Depth of the hitbox in blocks. A negative value will be assumed to be 0.
pivotarray
The offset from the entity's anchor where the hitbox will spawn.
pivot
0..0number
1..1number
2..2number