minecraft:ignore_cannot_be_attacked for you with a switch.Get GodCraftOverview
minecraft:ignore_cannot_be_attacked is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets this entity attack entities that have minecraft:cannot_be_attacked. Use filters to pick which ones.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
filters | Filter Group | {"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null} | Which protected entities (as "other") may still be attacked; leave empty to allow all. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
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
}
}
}