Mojira Archive
MCPE-74444

Zoglins uselessly try to attack Withers

Zoglins try to attack Withers, which they cannot damage.

Steps to reproduce:

  1. Spawn a wither and a zoglin next to each other

Observed result:
The zoglin chases the wither to no avail.

Expected result:
The zoglin does not attack the wither, which it cannot damage.

Fix:
Change the following field in the zoglin.json file to:

      "minecraft:behavior.nearest_attackable_target": {
        "priority": 3,
        "within_radius": 16.0,
        "entity_types": [
          {
            "filters": {
              "all_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "operator": "!=",
                  "value": "zoglin"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "operator": "!=",
                  "value": "creeper"
                },
                {
                  "test": "is_family",
                  "subject": "other",
                  "operator": "!=",
                  "value": "wither"
                }
              ]
            },
            "max_dist": 16
          }
        ],
        "must_see": true
      },