Steps To Reproduce:
Join any Minecraft world
Toggle perspective mode, so you can see your cape
Now start walking with sprint and press W+A or W+D
Move your mouse in the direction you're walking (it should look like you're walking in circles)
Observe how weirdly the cape behaves
Expected Result: Smooth cape movement animation, just as it was before snapshot 18w05a
Actual Result: Cape animation is jittering
Video demonstrating the issue: YouTube Video
Additional Information:
After a few checks, I found that the first time when the bug appeared in a game was in a snapshot 18w05a, but before that version, there was a snapshot 18w03b where everything was fine with a cape.
Code Analysis:
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by 5
relates to 2
Attachments
Comments 47
Probably caused by the fix of MC-75279
Hey, this issue has been around for a while now, so I just want to explain how to fix it.
The cape is simply not interpolated correctly at a certain point in the code.
To fix this you only have to change one line in the following method:net.minecraft.client.renderer.entity.layers.CapeLayer#render
Add the interpolation to the body rotation by multiplying the rotation with the partialTicks variable.
That's it! You can also take a look at my screenshot of my changes to the code:
!diff.png!
I really hope that helps to fix this issue!
A speculation of why the solution proposed by @LabyStudio was not implemented yet, seems like it was caused by another issue.
At that point in code, if the entity is a passenger of another entity, "entity.yBodyRot
" have its value clamped at between -360 and 360, while "entity.yBodyRotO
" still have its normal value, outside that range.
So by that, doing the linear interpolation (lerp) as proposed, the final result would vary depending on how much the two rotation values differs.
Could you explain what's different? I'm not seeing any difference.