[GH-ISSUE #6121] Enderman eye contact detection seems inconsistent when moving #1982

Closed
opened 2026-11-02 15:51:06 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @byMehd on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6121

Originally assigned to: @xFedeT on GitHub.

When looking directly into an Enderman's eyes while moving around, its eye contact detection seems inconsistent in Horizon Rust.

In vanilla Minecraft Java Edition, an Enderman continues to recognize that the player is looking directly at its eyes while moving, as long as eye contact is maintained.

In Horizon Rust, the Enderman sometimes seems to stop detecting eye contact even when the player is still looking directly into its eyes while moving.

This may indicate an issue with Enderman eye contact detection and should be investigated.

Originally created by @byMehd on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6121 Originally assigned to: @xFedeT on GitHub. When looking directly into an Enderman's eyes while moving around, its eye contact detection seems inconsistent in Horizon Rust. In vanilla Minecraft Java Edition, an Enderman continues to recognize that the player is looking directly at its eyes while moving, as long as eye contact is maintained. In Horizon Rust, the Enderman sometimes seems to stop detecting eye contact even when the player is still looking directly into its eyes while moving. This may indicate an issue with Enderman eye contact detection and should be investigated.
Author
Owner

@xFedeT commented on GitHub (Nov 1, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6561556312 --> @xFedeT commented on GitHub (Nov 1, 2026): 🤖 Agent: /claim
Author
Owner

@xFedeT commented on GitHub (Nov 1, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6564302662 --> @xFedeT commented on GitHub (Nov 1, 2026): 🤖 Agent: /claim
Author
Owner

@github-actions[bot] commented on GitHub (Nov 1, 2026):

🤖 Claims: refused, You already hold this issue. (asked by @xFedeT)

<!-- gh-comment-id:6564344533 --> @github-actions[bot] commented on GitHub (Nov 1, 2026): 🤖 Claims: refused, You already hold this issue. (asked by @xFedeT)
Author
Owner

@xFedeT commented on GitHub (Nov 1, 2026):

🤖 Agent: I checked this against EnderMan.isBeingStaredBy / LivingEntity.isLookingAtMe and EndermanLookForPlayerGoal in 26.3, and Horizon's stared_at and the goal (mobs/enderman.rs) match them line by line: the 0.025 cone scaled by distance, the gaze height at the enderman's eye, the line-of-sight ray from the player's eye, the 5-tick aggro delay, and the stare re-test every tick. In a flat test (survival, 8 blocks away, looking at its eyes) the enderman reacted within a second. I could not build a case where it stops noticing a steady look, so I am not changing code. The cone is narrow (about 4 degrees at 10 blocks), so strafing around it without turning the view to follow its eyes leaves the cone, as in vanilla. If it fails for you while you keep the crosshair on its eyes, please say whether it is single player or a server, and the distance.

<!-- gh-comment-id:6564349634 --> @xFedeT commented on GitHub (Nov 1, 2026): 🤖 Agent: I checked this against `EnderMan.isBeingStaredBy` / `LivingEntity.isLookingAtMe` and `EndermanLookForPlayerGoal` in 26.3, and Horizon's `stared_at` and the goal (`mobs/enderman.rs`) match them line by line: the 0.025 cone scaled by distance, the gaze height at the enderman's eye, the line-of-sight ray from the player's eye, the 5-tick aggro delay, and the stare re-test every tick. In a flat test (survival, 8 blocks away, looking at its eyes) the enderman reacted within a second. I could not build a case where it stops noticing a steady look, so I am not changing code. The cone is narrow (about 4 degrees at 10 blocks), so strafing around it without turning the view to follow its eyes leaves the cone, as in vanilla. If it fails for you while you keep the crosshair on its eyes, please say whether it is single player or a server, and the distance.
Author
Owner

@byMehd commented on GitHub (Nov 1, 2026):

5. 🤖 Agent: I checked this against EnderMan.isBeingStaredBy / LivingEntity.isLookingAtMe and EndermanLookForPlayerGoal in 26.3, and Horizon's stared_at and the goal (mobs/enderman.rs) match them line by line: the 0.025 cone scaled by distance, the gaze height at the enderman's eye, the line-of-sight ray from the player's eye, the 5-tick aggro delay, and the stare re-test every tick. In a flat test (survival, 8 blocks away, looking at its eyes) the enderman reacted within a second. I could not build a case where it stops noticing a steady look, so I am not changing code. The cone is narrow (about 4 degrees at 10 blocks), so strafing around it without turning the view to follow its eyes leaves the cone, as in vanilla. If it fails for you while you keep the crosshair on its eyes, please say whether it is single player or a server, and the distance.

this happened on the latest nightly build, in a single-player world.

My test was roughly as follows:

I had an Enderman spawn egg in my hand.

I placed the Enderman and moved about 4–5 blocks away.

I looked directly at its eyes.

While maintaining eye contact, I moved slightly forward and backward.

That's when I noticed that the Enderman sometimes seemed to stop detecting my gaze, even though I was still aiming at its eyes.

However, this might just be a false lead or an issue with how I perceived the situation, so please don't spend too much time investigating it unnecessarily.

Feel free to run a few more tests if you think it's worth it, but if you can't reproduce the issue, don't hesitate to close it. I don't want you to waste time chasing a bug that might not actually exist.

<!-- gh-comment-id:6564513337 --> @byMehd commented on GitHub (Nov 1, 2026): > 5\. 🤖 Agent: I checked this against `EnderMan.isBeingStaredBy` / `LivingEntity.isLookingAtMe` and `EndermanLookForPlayerGoal` in 26.3, and Horizon's `stared_at` and the goal (`mobs/enderman.rs`) match them line by line: the 0.025 cone scaled by distance, the gaze height at the enderman's eye, the line-of-sight ray from the player's eye, the 5-tick aggro delay, and the stare re-test every tick. In a flat test (survival, 8 blocks away, looking at its eyes) the enderman reacted within a second. I could not build a case where it stops noticing a steady look, so I am not changing code. The cone is narrow (about 4 degrees at 10 blocks), so strafing around it without turning the view to follow its eyes leaves the cone, as in vanilla. If it fails for you while you keep the crosshair on its eyes, please say whether it is single player or a server, and the distance. this happened on the latest nightly build, in a single-player world. My test was roughly as follows: I had an Enderman spawn egg in my hand. I placed the Enderman and moved about 4–5 blocks away. I looked directly at its eyes. While maintaining eye contact, I moved slightly forward and backward. That's when I noticed that the Enderman sometimes seemed to stop detecting my gaze, even though I was still aiming at its eyes. However, this might just be a false lead or an issue with how I perceived the situation, so please don't spend too much time investigating it unnecessarily. Feel free to run a few more tests if you think it's worth it, but if you can't reproduce the issue, don't hesitate to close it. I don't want you to waste time chasing a bug that might not actually exist.
Author
Owner

@xFedeT commented on GitHub (Nov 1, 2026):

🤖 Agent: thanks for the test, it fits something vanilla does. In EndermanLookForPlayerGoal.tick, once the enderman is angry at you and still being stared at, it teleports (this.enderman.teleport()) if you are closer than 4 blocks (distanceToSqr < 16), and Horizon does the same (teleport_random in mobs/enderman.rs). You stood 4 to 5 blocks away and moved forward, so each step toward it could put you inside 4 blocks, where it jumps away at once and then looks as if it stopped noticing you. I could not make it lose a steady look from 5 blocks or more. I found no difference from vanilla, so there is nothing to fix; closing it is up to a maintainer.

<!-- gh-comment-id:6564613880 --> @xFedeT commented on GitHub (Nov 1, 2026): 🤖 Agent: thanks for the test, it fits something vanilla does. In `EndermanLookForPlayerGoal.tick`, once the enderman is angry at you and still being stared at, it teleports (`this.enderman.teleport()`) if you are closer than 4 blocks (`distanceToSqr < 16`), and Horizon does the same (`teleport_random` in `mobs/enderman.rs`). You stood 4 to 5 blocks away and moved forward, so each step toward it could put you inside 4 blocks, where it jumps away at once and then looks as if it stopped noticing you. I could not make it lose a steady look from 5 blocks or more. I found no difference from vanilla, so there is nothing to fix; closing it is up to a maintainer.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1982
No description provided.