-
Bug
-
Resolution: Won't Fix
-
None
-
Minecraft 1.9 Pre-Release 4, Minecraft 1.9, Minecraft 1.11, Minecraft 1.12 Pre-Release 5, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2 Pre-Release 2, Minecraft 1.12.2, 1.14.4, 1.16.1, 20w29a, 1.16.3, 1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 21w07a, 21w08b, 21w10a
-
Confirmed
-
(Unassigned)
The bug
When a player named "deadmau5" sneaks or flies with an elytra (and rotates his head), his ears are offset.
How to reproduce
- Copy the latest version folder in the .minecraft\versions directory and append _custom to the copied name, resulting in for example 1.12-pre5_custom
- Delete the .jar file inside the folder
- Append _custom to the version .json file name as well
- Replace the content of the version .json file with the following
{ "id": "#VERSION#_custom", "time": "2038-01-19T03:14:07+00:00", "releaseTime": "2038-01-19T03:14:07+00:00", "type": "snapshot", "minecraftArguments": "--username deadmau5 --version ${version_name} --gameDir ${game_directory} --assetsDir ${assets_root} --assetIndex ${assets_index_name} --uuid 1e18d5ff643d45c8b50943b8461d8614 --accessToken ${auth_access_token} --userType ${user_type} --versionType ${version_type}", "inheritsFrom": "#VERSION#", "jar": "#VERSION#" }
- Replace all occurrences of #VERSION# with the version id you created a copy of, for example 1.12-pre5
- Select this version in the launcher and start the game
- Switch to third person view (F5) and sneak
Code analysis
by Bemoty
The method net.minecraft.client.renderer.entity.layers.LayerDeadmau5Head.doRenderLayer() doesn't check if the to be rendered entity is sneaking. Thus, a simple way to fix the sneaking issue would be to add that specific check, which translates the ears a bit down. (I don't know the exact "sneak-shrink"-value, 0.25F is just an example!)
// ... if(entitylivingbaseIn.isSneaking()) { GlStateManager.translate(0F, 0.25F, 0F); } float f2 = 1.3333334F; GlStateManager.scale(1.3333334F, 1.3333334F, 1.3333334F); this.playerRenderer.getMainModel().renderDeadmau5Head(0.0625F); // ...
The fix I found for the elytra-flying issue is very similar to my proposed fix on MC-75279 – clamping the pitch of the ears does the job. Again, the values (-30F, -60F) are only examples, there may be other, way better values to use here.
// ... float f1 = entitylivingbaseIn.prevRotationPitch + (entitylivingbaseIn.rotationPitch - entitylivingbaseIn.prevRotationPitch) * partialTicks; GlStateManager.pushMatrix(); if(entitylivingbaseIn.isElytraFlying()) { f1 = MathHelper.clamp(f1, -60F, -30F); } // ...
Note: I do not own the username "deadmau5" neither do I know the person owning it personally. The attached screenshots were created by using "deadmau5" as username. The screenshots were taken for testing purposes.
- relates to
-
MC-52178 Cape doesn't move down while sneaking / Cape detaches from body while sneaking
- Resolved
-
MC-268696 The height of the nametag of an entity named "deadmau5" is different from the height of any other name
- Resolved
-
MC-204579 deadmau5's ears do not render translucent when invisible
- Open