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:
- Build a pillar to avoid being attacked by mobs.
- 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.
- 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. - 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, - 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
2023-06-08, 04:46 PM
2024-04-19, 07:05 PM
2024-04-09, 07:58 AM
3
1