mojira.dev
MC-1207

Head rotates in the wrong direction while riding

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 @unknown's comment.

Linked issues

MC-2924 Head backwards Resolved MC-8108 sometimes peoples faces look glitched when riding a pig Resolved MC-10400 When riding a pig which is riding a minecart, your body spins and your head doesn't. Resolved MC-10737 Head can be on backwards if riding pig in minecart (doesn't move) Resolved MC-10866 Riding a pig glitch Resolved

Attachments

Comments 40

Mortvert (Mort Imert)

I can duplicate this easily.

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.

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

Javier Juárez

Confirmed on snapshot 13w06a

This is the same of MC-1545.

30 more comments

@@unknown 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.

@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.

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.

Confirmed for 1.12.

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.

Harrison Barnes

Jens Bergensten

Confirmed

carrot_on_a_stick, head, passengers, pig-riding, riding, rotation

Minecraft 1.4.2, Minecraft 1.4.7, Snapshot 13w09a, Minecraft 1.5, Minecraft 1.5.1, ..., Minecraft 17w15a, Minecraft 17w17b, Minecraft 17w18a, Minecraft 17w18b, Minecraft 1.12

Minecraft 1.6.2, Minecraft 1.12

Retrieved