mojira.dev
MC-263315

Attack Target of hoglins/zoglins can't be detected by /execute on target

The Bug

The sub-command of /execute "on target" can select a mob that chasing/attacking by another mob, but it's ineffective for hoglins and zoglins.

Steps to Reproduce:

  1. Build a pillar to avoid being attacked by mobs.

  2. Summon a piglin brute below the pillar and fly onto the pillar and change you gamamode to survival, make the piglin brute try to attack you but can't reach you.

  3. Run this command.

    /execute as @e[type=minecraft:piglin_brute,limit=1,sort=nearest] on target at @s run particle lava ~ ~ ~ 0 0 0 0 100

    → ✔ There will appear some lava particle on you, because the target of the piglin brute is you.

  4. Summon a hoglin below the pillar and fly onto the pillar and change you gamamode to survival, make the hoglin try to attack you but can't reach you.
    → ✔ The hoglin find you and try to attack you,

  5. Run this command.

    /execute as @e[type=minecraft:hoglin,limit=1,sort=nearest] on target at @s run particle lava ~ ~ ~ 0 0 0 0 100

    -> ❌ It nothing happened, even if the target of the hoglin is you, but this issue don't happen to most mobs

Linked issues

Comments 0

No comments.

BLack_Tea_RGO

gegy

Confirmed

Platform

Low

Commands

1.20, 1.20.1 Release Candidate 1, 1.20.1, 1.20.4, 23w51b, 24w03b, 24w05b, 24w13a, 24w14a

1.20.5 Pre-Release 1

Retrieved