mojira.dev
MCPE-35306

Enderman sometimes stops being hostile even when we deal damage or look to him

Sometimes when enderman is hostile and is attacking us, randomly he stops being hostile and stops attacking.This happens when he teleports or when he is taking damage and sometimes you running from him some time he stops being hostile

Additional information provided by @unknown

Endermen in all dimensions regularly stop being hostile towards a player after being aggroed by the player. This can happen after a second or a few seconds. It should also be noted that this is related to endermen teleportation as it is when they teleport that they loose their aggression towards the player.

While most obvious in the nether (as you hit the endermen once and it is usually never seen again after it tps) it can be observed in other circonstances.

This makes collecting ender pearls especially tedious and painful as the endermen rarely remains aggored long enough at a player for the player to be able to kill it.

To reproduce

  1. Create a flat world in creative mode

  2. Give yourself netherite armour for protection, a stack of enchanted golden apples, and a stack of endermen spawn eggs.

  3. Make sure you are wearing the armour and then switch the gamemode to survival.

  4. Once in survival, eat an enchanted golden apple to not die from endermen attacks.

  5. Now, spawn one endermen on the ground using the endermen egg.

  6. Stare at the endermen to make it aggro towards you.

  7. Hit the endermen with your fist to keep it from hitting you.

  8. Continue to do this until the endermen teleports.

  9. Turn and look around to see where the endermen has teleported to.

  10. The endermen will either have unaggroed or if he is still aggro, repeat step 7 to 9 until he unaggroes from you. (This should not take long)

  11. Observe that the endermen has unaggroed from the player.

  12. Repeat process to see that it is not simply a one off occurrence.

  13. Note that the endermen can seemingly unaggro from the player at any distance.

Observed results:
The endermen often unaggroes from the player after teleporting. This can happen at any distance from the player.

*Expected result: *
The endermen should not unaggro from the player moments after having been aggroed by a player and as long as it has not despawned from being outside the simulation distance.

Linked issues

Attachments

Comments

migrated

I think that is intended. Endermen will stop attacking the player after taking several hits or damage according to the wiki.

migrated

I think it would be hitbox or something problems

but however it wouldn't be work when idling when you not moving.

migrated

Affects 1.11.0.1 beta version

migrated

Affects 1.11.0.3 beta version

migrated

Affects 1.11.0.4 beta version

migrated

I have this issue.  I will stare at an enderman and it will not attack

migrated

Agree with Jeffrey. When you get the first hit their is a small chance it will remain neutral btw. (I am not 100% sure this affects bedrock but it affects some version.) 🙂

GoldenHelmet

This is due to the enderman’s follow_range bring too short: it’s 32 instead of 64–see MCPE-50207. If an enderman randomly teleports to a position where the player is no longer within its follow_range, it will stop targeting. This is especially likely to happen if the player is running from the enderman, as noted in the description.

migrated

Confirmed for 1.16.0

migrated

this happens especially when using a fire spect sword which causes them to teleport repeatedly and out of range

migrated

Affects 1.17.40.20

migrated

Please update description to the following if possible:

 

Description: 
Endermen in all dimensions regularly stop being hostile towards a player after being aggroed by the player. This can happen after a second or a few seconds. It should also be noted that this is related to endermen teleportation as it is when they teleport that they loose their aggression towards the player.

While most obvious in the nether (as you hit the endermen once and it is usually never seen again after it tps) it can be observed in other circonstances. 

This makes collecting ender pearls especially tedious and painful as the endermen rarely remains aggored long enough at a player for the player to be able to kill it. 

 

To reproduce:

  1. Create a flat world in creative mode

  2. Give yourself netherite armour for protection, a stack of enchanted golden apples, and a stack of endermen spawn eggs.

  3. Make sure you are wearing the armour and then switch the gamemode to survival.

  4. Once in survival, eat an enchanted golden apple to not die from endermen attacks.

  5. Now, spawn one endermen on the ground using the endermen egg.

  6. Stare at the endermen to make it aggro towards you.

  7. Hit the endermen with your fist to keep it from hitting you.

  8. Continue to do this until the endermen teleports.

  9. Turn and look around to see where the endermen has teleported to.

  10. The endermen will either have unaggroed or if he is still aggro, repeat step 7 to 9 until he unaggroes from you. (This should not take long)

  11. Observe that the endermen has unaggroed from the player.

  12. Repeat process to see that it is not simply a one off occurrence.

Note that the endermen can seemingly unaggro from the player at any distance. 

Observed results:

The endermen often unaggroes from the player after teleporting. This can happen at any distance from the player.

Expected result: 

The endermen should not unaggro from the player moments after having been aggroed by a player and as long as it has not despawned from being outside the simulation distance. 

GoldenHelmet

The reason that endermen "seemingly" unaggro at any distance is that they often teleport more than once in rapid succession.

As I stated in my older comment, the bug here is just that the enderman's follow_range is set to 32, when it should be 64. Whenever a mob's target is farther away than its follow_range, it stops following, i.e. it drops or "forgets" the target. Endermen losing aggro happens much more rapidly since 1.18 because its teleport range was doubled (MCPE-152268).

[media]

can be used to demonstrate that losing aggro is a simple matter of the enderman teleporting > 32 blocks from the player. It consists of a command block that gives the player an arrow on every tick that an enderman is within 32 blocks. A ring of redstone lights also stays lit as long as an enderman is within 32 blocks and goes out when there is no enderman within 32 blocks.

To use the test world:

  1. Stand on the command block at 0, 0.

  2. Give yourself resistance 6 (/effect @s resistance 20000 5 true)

  3. Summon an enderman.

  4. Hit it.

  5. Try to keep looking at it and hit it every time it comes near.

  6. Note when the enderman loses aggro and when the lights go out and the arrows stop pulsing.

Expected result:

The enderman maintains aggro.

Observed result:
The enderman loses aggro after a few seconds, and the moment it loses aggro coincides with the lights going out and the arrows stopping pulsing. (Note that the lights and arrows will resume if the enderman comes back in range.)

Here is an enderman file with this bug fixed and otherwise matching 1.18.10-1.18.33 vanilla.

[media]

migrated

So this bug can't be unsolved, right? I understand that enderman's follow-range was modified but then what can we do? just acept it?

migrated

(Unassigned)

203044, 786670

Confirmed

Multiple

Android 6.0

enderman

1.13.0.1 Beta, 1.12.0.14 Beta, 1.19.0.35 Preview, 1.18.33 Hotfix, 1.18.32, ..., 1.18.12 Hotfix, 1.18.30, 1.18.31, 1.19.0, 1.19.20

1.19.50.20 Preview, 1.19.50

Retrieved