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

minecraft:ignore_cannot_be_attacked

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

概览

minecraft:ignore_cannot_be_attacked 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让这个实体可以攻击带有 minecraft:cannot_be_attacked 的实体。用过滤器选择具体哪些。

字段

字段类型默认值说明
filtersFilter Group{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}哪些受保护的实体(作为 "other")仍然可以被攻击;留空表示全部允许。

示例

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

BP/entities/<name>.json
{
  "minecraft:ignore_cannot_be_attacked": {
    "filters": {
      "AND": null,
      "NOT": null,
      "OR": null,
      "all": null,
      "all_of": null,
      "any": null,
      "any_of": null,
      "none_of": null
    }
  }
}

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