The Bug
If you are in spectator mode, the eye will follow you.
Steps to Reproduce
Summon a guardian.
/summon minecraft:guardian ~ ~ ~ {NoAI:1b}
Switch into spectator mode and look at the eye of the guardian.
Move left and right.
Take note as to whether or not the eyes of guardians follow players in spectator mode.
Observed Behavior
The eyes of guardians follow players in spectator mode.
Expected Behavior
The eyes of guardians would not follow players in spectator mode.
Related issues
is duplicated by
relates to
Attachments
Comments


Anything flowing out of noAI is intended and won't be changed. They're not going to rewrite a large chunk of code just so the eye doesn't follow with noAI.

if you are in spectator mode, the eye will follow you
could be problematic, but they have to decide if they consider it as a bug
Confirmed for
1.8.4

Simplifying to the remaining issue that isn't already covered by other issues.

I just tested it and it always focuses the nearest the player watching it as it is rendered client side.
However it would be still fixable by just adding this condition in front of the eye rendering in the ModelGuardian.java (1.8)
class (1.8 MCP names):
if (!Minecraft.getMinecraft().playerController.isSpectatorMode())
So it would look like this:
ModelGuardian.java (1.8)
if (!Minecraft.getMinecraft().playerController.isSpectatorMode()) {
this.guardianEye.rotationPointZ = -8.25F;
Object var26 = Minecraft.getMinecraft().func_175606_aa();
if (var8.func_175474_cn())
{
var26 = var8.func_175466_co();
}
if (var26 != null)
{
Vec3 var18 = ((Entity)var26).func_174824_e(0.0F);
Vec3 var19 = p_78087_7_.func_174824_e(0.0F);
double var20 = var18.yCoord - var19.yCoord;
if (var20 > 0.0D)
{
this.guardianEye.rotationPointY = 0.0F;
}
else
{
this.guardianEye.rotationPointY = 1.0F;
}
Vec3 var22 = p_78087_7_.getLook(0.0F);
var22 = new Vec3(var22.xCoord, 0.0D, var22.zCoord);
Vec3 var23 = (new Vec3(var19.xCoord - var18.xCoord, 0.0D, var19.zCoord - var18.zCoord)).normalize().rotateYaw(((float)Math.PI / 2F));
double var24 = var22.dotProduct(var23);
this.guardianEye.rotationPointX = MathHelper.sqrt_float((float)Math.abs(var24)) * 2.0F * (float)Math.signum(var24);
}
}
Note however that it can still be considered as a bug that a guardian is not looking at the closest player.

Is this still an issue in the most recent versions (currently that is 1.10.2, or 16w42a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.

Can confirm for 1.13.1-pre1

Affects 1.13.1-pre2

Confirmed for 1.13.1.
@unknown you mean for 1.13.1?

✔

Confirmed for 1.13.2-pre1.

Can confirm for 20w07a. Can I request ownership?

@@unknown, you are the reporter now.

Confirmed for 20w19a

20b
Can confirm in 20w51a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a. Video attached.
Can confirm in 1.16.5 and 21w10a.
Can confirm in 21w11a.
Can confirm in 21w17a.
Can confirm in 1.17.
Can confirm in 1.17.1.
Can confirm this behavior in 21w41a. Here are some extra details regarding this problem.
The Bug:
The eyes of guardians follow players in spectator mode.
Steps to Reproduce:
Summon a guardian.
/summon minecraft:guardian ~ ~ ~ {NoAI:1b}
Switch into spectator mode and look at the eye of the guardian.
Move left and right.
Take note as to whether or not the eyes of guardians follow players in spectator mode.
Observed Behavior:
The eyes of guardians follow players in spectator mode.
Expected Behavior:
The eyes of guardians would not follow players in spectator mode.
Can confirm in 1.18.1.
Can confirm in 1.18.2.
Can confirm in 1.19 and 22w24a.
Can confirm in 1.19.2.