[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: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 |
| 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: |
| Comment by Ksenofontov Alexander [ 30/Jun/13 ] |
|
Very easy to fix. Mojang forgot restore after rendering the rotationYawHead field in entity class. ===== 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. |
| 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. |
| Comment by Kumasasa [ 05/Nov/12 ] |
|
Other way: |
| Comment by Chalmes (Jon) [ 01/Nov/12 ] |
|
To easily reproduce:
|