1. Wiki
  2. /实体
  3. /minecraft:custom_hit_test

minecraft:custom_hit_test

不想手写?在 GodCraft 里打开一个开关,就能帮你设置好 minecraft:custom_hit_test。Get GodCraft

概览

minecraft:custom_hit_test 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 定义一个或多个受击判定框,用于判断实体是否被近战或弹射物击中。当可点击区域需要和碰撞箱不同时使用。

字段

字段类型默认值说明
hitboxesArray无受击判定框列表,每个都有自己的大小和偏移。

示例

写在 BP/entities/<name>.json 的 components 对象中(值为默认值或占位值):

BP/entities/<name>.json
{
  "minecraft:custom_hit_test": {
    "hitboxes": {}
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more