[MC-1545] Player's and Horses head while riding having strange behaviour when looking at the skin in the inventory Created: 31/Oct/12  Updated: 01/Oct/16  Resolved: 01/Jul/13

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.1, Minecraft 1.4.2, Minecraft 1.4.5, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w09c, Snapshot 13w10a, Snapshot 13w10b, Minecraft 1.5, Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w18b, Snapshot 13w18c, Snapshot 13w19a, Snapshot 13w21a, Snapshot 13w21b, Snapshot 13w22a, Minecraft 1.6, Minecraft 1.6.1
Fix Version/s: Minecraft 1.6.2

Type: Bug
Reporter: Meta Assignee: [Mojang] Jeb (Jens Bergensten)
Resolution: Fixed Votes: 3
Labels: None

Attachments: PNG File 2013-06-16_02.20.48.png     PNG File 2013-06-16_02.53.15(with ShoulderSurfing mod).png     File EpilepticHead.mp4    
Issue Links:
Duplicate
is duplicated by MC-8693 shaking head when open inventory Resolved
is duplicated by MC-10301 Head violently shakes in third person... Resolved
is duplicated by MC-11649 Head glitches while in inventory Resolved
is duplicated by MC-15334 Player's head rotates after going in ... Resolved
is duplicated by MC-16586 Donkey head twitching Resolved
is duplicated by MC-17264 in the snapshot and you move the hors... Resolved
is duplicated by MC-18572 Horse head twitches when looking in i... Resolved
is duplicated by MC-18950 When opening the inventory while on a... Resolved
is duplicated by MC-19793 Head spins while in F5 view in creati... Resolved
is duplicated by MC-19798 When I open a tamed horse's GUI and m... Resolved
is duplicated by MC-20284 While in "Horse Inventory Menu", maki... Resolved
is duplicated by MC-20613 a head of a horse spazes out Resolved
is duplicated by MC-22838 I put f5 two times to see my skin so ... Resolved
is duplicated by MC-2282 Head glitches while in survival inven... Resolved
CHK:
Confirmation Status: Confirmed

 Description   

As said above, when looking at the own skin in the inventory, the world model's head is moving strangely. Best noticible on mini GUI (and a close look of your character or maybe a big screen).



 Comments   
Comment by Ezer'Arch [ 05/Apr/14 ]

I think this is duplicate of MC-1207, but this ticket covers not only pig riding.

Comment by Gerottinho [ 07/Jul/13 ]

Confirmed to... 1.2.5. (I found this bug in the past, it was so funny)

Comment by Rodrigo [ 02/Jul/13 ]

iiI

It's very good now i have ten hors's

Comment by Ezer'Arch [ 02/Jul/13 ]

Thank you for fixing it. This bug was screwing up my videos.

Comment by Ksenofontov Alexander [ 01/Jul/13 ]

Thanks! Is @jeb_ mean 1.7 as 1.6 release?

Comment by Kumasasa [ 01/Jul/13 ]

@Ksenofontov Alexander:
Tip: Put
{code}
... here is the code
{code}

Comment by Ksenofontov Alexander [ 30/Jun/13 ]

Very easy to fix. Mojang forgot restore after rendering the rotationYawHead field in entity class.
From (Class "GuiInventory" by MCP mapping):

===== START ======
    public static void func_110423_a(int par0, int par1, int par2, float par3, float par4, EntityLivingBase par5EntityLivingBase)
    {
        GL11.glEnable(GL11.GL_COLOR_MATERIAL);
        GL11.glPushMatrix();
        GL11.glTranslatef((float)par0, (float)par1, 50.0F);
        GL11.glScalef((float)(-par2), (float)par2, (float)par2);
        GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
        float var6 = par5EntityLivingBase.renderYawOffset;
        float var7 = par5EntityLivingBase.rotationYaw;
        float var8 = par5EntityLivingBase.rotationPitch;
        GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);
        RenderHelper.enableStandardItemLighting();
        GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(-((float)Math.atan((double)(par4 / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F);
        par5EntityLivingBase.renderYawOffset = (float)Math.atan((double)(par3 / 40.0F)) * 20.0F;
        par5EntityLivingBase.rotationYaw = (float)Math.atan((double)(par3 / 40.0F)) * 40.0F;
        par5EntityLivingBase.rotationPitch = -((float)Math.atan((double)(par4 / 40.0F))) * 20.0F;
        par5EntityLivingBase.rotationYawHead = par5EntityLivingBase.rotationYaw;
        GL11.glTranslatef(0.0F, par5EntityLivingBase.yOffset, 0.0F);
        RenderManager.instance.playerViewY = 180.0F;
        RenderManager.instance.renderEntityWithPosYaw(par5EntityLivingBase, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
        par5EntityLivingBase.renderYawOffset = var6;
        par5EntityLivingBase.rotationYaw = var7;
        par5EntityLivingBase.rotationPitch = var8;
        GL11.glPopMatrix();
        RenderHelper.disableStandardItemLighting();
        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
        OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
        GL11.glDisable(GL11.GL_TEXTURE_2D);
        OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
    }
====== END =======

To:

===== START ======
    public static void func_110423_a(int par0, int par1, int par2, float par3, float par4, EntityLivingBase par5EntityLivingBase)
    {
        GL11.glEnable(GL11.GL_COLOR_MATERIAL);
        GL11.glPushMatrix();
        GL11.glTranslatef((float)par0, (float)par1, 50.0F);
        GL11.glScalef((float)(-par2), (float)par2, (float)par2);
        GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
        float var6 = par5EntityLivingBase.renderYawOffset;
        float var7 = par5EntityLivingBase.rotationYaw;
        float var8 = par5EntityLivingBase.rotationPitch;
        float savedHeadYaw = par5EntityLivingBase.rotationYawHead;// <----- ADDED THIS LOCAL VARIABLE FOR STORING CURRENT HEAD ROTATION
        GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);
        RenderHelper.enableStandardItemLighting();
        GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(-((float)Math.atan((double)(par4 / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F);
        par5EntityLivingBase.renderYawOffset = (float)Math.atan((double)(par3 / 40.0F)) * 20.0F;
        par5EntityLivingBase.rotationYaw = (float)Math.atan((double)(par3 / 40.0F)) * 40.0F;
        par5EntityLivingBase.rotationPitch = -((float)Math.atan((double)(par4 / 40.0F))) * 20.0F;
        par5EntityLivingBase.rotationYawHead = par5EntityLivingBase.rotationYaw;
        GL11.glTranslatef(0.0F, par5EntityLivingBase.yOffset, 0.0F);
        RenderManager.instance.playerViewY = 180.0F;
        RenderManager.instance.renderEntityWithPosYaw(par5EntityLivingBase, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
        par5EntityLivingBase.renderYawOffset = var6;
        par5EntityLivingBase.rotationYaw = var7;
        par5EntityLivingBase.rotationPitch = var8;
        par5EntityLivingBase.rotationYawHead = savedHeadYaw;//<------ ADDED RESTORING HEAD ROTATION
        GL11.glPopMatrix();
        RenderHelper.disableStandardItemLighting();
        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
        OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
        GL11.glDisable(GL11.GL_TEXTURE_2D);
        OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
    }
====== END =======

That's all. Fixes both for player and horse.
Moderators, please put code in code tag _
Sorry for long comment

Comment by Ezer'Arch [ 16/Jun/13 ]

Added a screenshot taken with ShoulderSurfing mod which was used to displace the camera/view sideways so that it's easier to see the bug occurring.

Comment by Ezer'Arch [ 16/Jun/13 ]

This bug still occurs in 13w24b. It happens in any situation when you open, in the 3rd person view both front and back views, any inventory that have a thumbnail with player's model. You don't need to be ridding a horse, this just makes the bug more noticeable since the inventory window covers a big portion of the screen.

In 1.5.2 and 13w24b, the player's head rotates 45-90ยบ towards the mouse pointer and it's likely to shake rapidly depending on the distance between the camera and the player. Upon closing the inventory window, you'll see the head rotating back to its normal position. If you install ShoulderSurfing mod, you can move the camera sideways a bit so you'll be able to see clearly the issue.

It's not something that could harm the gameplay, but it's an issue for those who record videos: it seems the player is having seizure.

My guess is that, there's a conflict between the "preview" model in the inventory and the in-world player's model. Either they should disable any movement of the in-world player's model whist the inventory is open or make both in-world and inventory player's model synchronize with each other. The latter is a more elegant solution, in my opinion.

Comment by Tails [ 23/May/13 ]

Now when riding a horse this bug happens with the horse head aswell and is more noticeable.

Comment by Meta [ 06/Dec/12 ]

@kumasasa: as seen in the video and the description

Comment by Kumasasa [ 22/Nov/12 ]

Still reproducible in 1.4.5.
Effect only in survival inventory or in the survival part of the creative inventory.
Apparently this flickering is an interference with the little avatar in the armor section of the inventory.

Comment by Kumasasa [ 05/Nov/12 ]

Other way:
1. Stand with your back at a tree
2. Press F5 once, back of head will fill whole window
3. -> Inventory, Head flickers

Comment by Chalmes (Jon) [ 01/Nov/12 ]

To easily reproduce:

  1. Stand close to a tree, facing directly at it.
  2. Press F5 twice to switch to looking at player head, head should be quite large within the window.
  3. Access inventory and observe head in main window. Appears to face backwards, but is glitchy.
Generated at Sun Jan 12 11:54:48 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.