[MC-1207] Head rotates in the wrong direction while riding Created: 29/Oct/12  Updated: 24/Sep/17  Resolved: 29/Jun/17

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.2, Minecraft 1.4.7, Snapshot 13w09a, Minecraft 1.5, Minecraft 1.5.1, Minecraft 1.5.2, Minecraft 1.7.5, Minecraft 14w11b, Minecraft 1.7.6-pre1, Minecraft 1.7.6-pre2, Minecraft 1.7.9, Minecraft 14w19a, Minecraft 14w21b, Minecraft 14w31a, Minecraft 14w32b, Minecraft 1.8-pre1, Minecraft 1.8-pre3, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 1.8.1, Minecraft 1.8.2-pre1, Minecraft 1.8.3, Minecraft 1.8.4, Minecraft 1.8.7, Minecraft 1.8.8, Minecraft 15w31a, Minecraft 15w36d, Minecraft 15w37a, Minecraft 15w43c, Minecraft 15w44a, Minecraft 15w46a, Minecraft 15w49a, Minecraft 1.8.9, Minecraft 15w50a, Minecraft 15w51b, Minecraft 16w06a, Minecraft 1.9, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 16w14a, Minecraft 16w21a, Minecraft 1.10.1, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w35a, Minecraft 16w39a, Minecraft 16w39c, Minecraft 16w40a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w15a, Minecraft 17w17b, Minecraft 17w18a, Minecraft 17w18b, Minecraft 1.12
Fix Version/s: Minecraft 1.6.2, Minecraft 1.12

Type: Bug
Reporter: Harrison Barnes Assignee: [Mojang] Jeb (Jens Bergensten)
Resolution: Fixed Votes: 35
Labels: carrot_on_a_stick, head, passengers, pig-riding, riding, rotation

Attachments: PNG File 2014-04-05_17.58.14.png     PNG File 2014-12-29_13.38.57.png     PNG File 2015-11-23_20.20.44.png     PNG File 2016-06-26_13.27.52.png     PNG File 2016-06-26_13.28.17.png     PNG File mc - backwards heads.png    
Issue Links:
Duplicate
is duplicated by MC-8108 sometimes peoples faces look glitched... Resolved
is duplicated by MC-10400 When riding a pig which is riding a m... Resolved
is duplicated by MC-10737 Head can be on backwards if riding pi... Resolved
is duplicated by MC-10866 Riding a pig glitch Resolved
is duplicated by MC-17480 When player on pig and pressed f5 hea... Resolved
is duplicated by MC-48046 Head backwards while riding a Pig / V... Resolved
is duplicated by MC-49500 Head rotates in the wrong direction w... Resolved
is duplicated by MC-52484 Creepy head rotating when riding a pig Resolved
is duplicated by MC-55713 Strange player rotation on untamed ho... Resolved
is duplicated by MC-65927 Head turns backwards when on a mount Resolved
is duplicated by MC-66904 Bug, pig riding=backwards head. Resolved
is duplicated by MC-73507 Player heads are backwards when ridin... Resolved
is duplicated by MC-73591 When riding an entity and going into ... Resolved
is duplicated by MC-75946 Riding a pig Resolved
is duplicated by MC-78475 Player's head turns 360 when turning ... Resolved
is duplicated by MC-83208 Mobs riding Shulker turn head 360° Resolved
is duplicated by MC-83451 3rd Person Horse Render Bug Resolved
is duplicated by MC-88536 Player model goes a bit wonky when si... Resolved
is duplicated by MC-89497 Incorrect player model while shooting... Resolved
is duplicated by MC-91227 Taming and Riding Horses Broken Resolved
is duplicated by MC-94232 Weird rendering Resolved
is duplicated by MC-96626 16w05b - F5 mode sitting on pig, body... Resolved
is duplicated by MC-99280 Player model wrong when riding a horse Resolved
is duplicated by MC-99521 player's head is backwards when looki... Resolved
is duplicated by MC-100988 Pig and Elytra model glitch Resolved
is duplicated by MC-102487 Riding pig, equipment character bug Resolved
is duplicated by MC-104649 backwards spider jockey spider heads Resolved
is duplicated by MC-105017 Head twisting when riding pig Resolved
is duplicated by MC-108052 Head rotation problem Resolved
is duplicated by MC-108232 When you're riding and at second-pers... Resolved
is duplicated by MC-108400 When player riding or sitting on llam... Resolved
is duplicated by MC-114169 When riding an armour stands, players... Resolved
is duplicated by MC-116207 Player's head faces wrong direction w... Resolved
is duplicated by MC-2924 Head backwards Resolved
Relates
relates to MC-79735 Armor Stand passengers rotation displ... Open
relates to MC-100000 Arms in boat do not rotate correctly ... Open
relates to MC-120805 Pig rotation is wrong when you see a ... Resolved
CHK:
Confirmation Status: Confirmed

 Description   

The bug

It affects all gamemodes, when you are riding a mob (no minecart or boat) and you look around in this person view, it twists your head backwards if you look in the opposite direction of the mob.
Here is a video demonstrating it:
http://www.youtube.com/watch?v=5zV4kRict30

Code analysis

See me4502's comment.



 Comments   
Comment by Madeline Miller [ 11/Jun/17 ]

I can confirm this was fixed in 1.12 using the above code. I had a quick chat to Grum and he confirmed that it was merged in for 1.12, and I've re-ran the tests I ran when I made the patch with vanilla 1.12 and it is working as it should.

Comment by . [ 08/Jun/17 ]

Confirmed for 1.12.

Comment by Madeline Miller [ 18/May/17 ]

After extensive testing, I can say that the highlighted line in the following image fixes the problem without any loss of functionality: http://i.imgur.com/H06P4AI.png

This is using MCP names, but should be super easy to transfer to MC names.

Comment by Void_Concept [ 17/May/17 ]

@marcono1234 I disagree with that completely. Yes, specific things like boats should restrict rotation. However there was a use case that I had (years ago at this point, so idr) that would rotate an entity with no AI separately from the entity it was riding.

I'm pretty sure I was attempting to use an armor stand as a marker for where a villager was standing while rotating the villager to face a specific direction. I think I would have had to rotate both the armor stand and the villager to face that direction if I wanted to get it to work correctly. It would be even worse if I had to rotate the armor stand specifically before the villager, otherwise the villager would pop back to whatever direction it is forced to look by what you are suggesting.

Comment by Marcono1234 [ 16/May/17 ]

@me4502 to be honest I think the bug is that you can rotate that far at all. Instead the rotation should be restricted like it is currently the case with boats.

Comment by Madeline Miller [ 15/May/17 ]

So I've been looking into this issue, and it appears to be caused by the rotation offset applied in doRender, in RenderLivingBase. If an entity is riding an entity that extends EntityLivingBase, the 'f' value is modified, which is the rotation point for the body.

This is applied as a global rotation, which breaks head rotations. f2 could be modified, however that's linked to body rotation eventually as well. It appears it'll need to pass extra info through to solve this.

(Everything using MCP names for 1.11.2)

Comment by user33 [ 08/May/17 ]

Confirmed for 17w18b

Comment by . [ 12/Apr/17 ]

Confirmed for 17w15a.

Comment by . [ 08/Feb/17 ]

Confirmed for 17w06a.

Comment by . [ 14/Nov/16 ]

Confirmed for 1.11.

Comment by . [ 28/Sep/16 ]

Confirmed for 16w39a.

Comment by Fabian Röling [ 26/Jun/16 ]

Before everyone starts adding random entities, I removed the list. And as I was already on it, I changed the description. I'm pretty sure that minecarts and boats are the only exceptions to this, but if there are more, feel free to correct me.

Comment by Fabian Röling [ 22/Jun/16 ]

Confirmed for 1.10.1.

Comment by David Carlstedt Ringius [ 19/Apr/16 ]

confirmed for 1.9.2

Comment by Philipp Koehler [ 05/Mar/16 ]

Can confirm for Release 1.9.

Comment by user33 [ 13/Feb/16 ]

Confirmed for 16w06a

Comment by Void_Concept [ 22/Dec/15 ]

Can confirm for 15w51b. This also affects mobs riding other mobs (or Armor Stands in my case)

Comment by Enoch Fox [ 18/Dec/15 ]

Please add that this effects riding all mobs aside from Boats

Comment by Onnowhere [ 12/Nov/15 ]

Confirmed 15w46a

Comment by Swekob [ 28/Oct/15 ]

Confirmed for 15w44a.

Comment by Swekob [ 26/Oct/15 ]

Confirmed for 15w43c.

Comment by Dobypeti [ 02/Aug/15 ]

Confirmed for 1.8.8.

Comment by Dylan [ 18/Jul/15 ]

Confirmed in 1.8.7.

Comment by Sam Bone [ 24/May/15 ]

Not only for players, I spawned a zombie with my head riding a zombie horse. The head was backewards on it, too!

It makes it hard to take what I was building seriously.

Comment by Dylan [ 20/Apr/15 ]

Confirmed for 1.8.4, appears to be effective whenever the player is riding any entity, including armor stands and all mobs that weren't mentioned here. It also appears to invert the yaw aspect of the head as well as the pitch.

Comment by Keighly W [ 09/Mar/15 ]

This has happened to me. I'm not sure if it's fixed by now as it only happened yesterday before I logged off, so...yea!

Comment by Onnowhere [ 20/Feb/15 ]

Confirmed 1.8.3

Comment by ColdVolcano [ 01/Jan/15 ]

I can confirm for Minecraft 1.8.1 and 1.8.2-pre1

Comment by kasamikona [ 25/Oct/14 ]

I can also confirm for 1.8.1-pre3

Comment by [Mod] redstonehelper [ 07/Oct/14 ]

Confirmed for 1.8.

Comment by Jesper the End [ 30/Aug/14 ]

Confirmed for 1.8-pre3

Comment by [Mod] redstonehelper [ 24/Aug/14 ]

Confirmed for 1.8-pre1.

Comment by Samuel Shank [ 07/Aug/14 ]

confirmed for 14w32b

Comment by Jesper the End [ 06/Aug/14 ]

confirmed for 14w31a

Comment by Itouch2 [ 10/May/14 ]

Confirmed for Donkey in 14w19a.

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

This is the same of MC-1545.

Comment by Javier Juárez [ 10/Feb/13 ]

Confirmed on snapshot 13w06a

Comment by julian mazer [ 16/Jan/13 ]

I Thought that was a feature to make it more like riding like a horse

Comment by Kumasasa [ 16/Nov/12 ]

Confirmed. When riding a minecart or boat the whole player turns when the head turns, but on a pig the pig and player stands still and only the head rotates owl-like.

Comment by Mortvert (Mort Imert) [ 11/Nov/12 ]

I can duplicate this easily.

Generated at Sun Jan 12 11:53:40 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.