Skip to content

Commit

Permalink
fix #701
Browse files Browse the repository at this point in the history
  • Loading branch information
LeLeMoe committed Mar 17, 2020
1 parent c2011df commit db46845
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.setting

libs/
lib/

# Mobile Tools for Java (J2ME)
.mtj.tmp/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@ public void renderHand(boolean firstPerson) {
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
ShaderSimple.instance().useProgram();
glPushMatrix();
EntityPlayer player = Minecraft.getMinecraft().player;
if(firstPerson) {
glTranslated(.26, 1.48, -.24);
double pitchRad = Math.toRadians(player.rotationPitch);
double eyeHeight = player.getEyeHeight();
glTranslated(0, Math.cos(pitchRad) * eyeHeight, Math.sin(pitchRad) * eyeHeight);
glTranslated(.26, -.15, -.24);
glScalef(.4f, .4f, 1f);
} else {
EntityPlayer player = Minecraft.getMinecraft().player;
glTranslated(0, 1.8, -1);
glRotated(-player.rotationPitch, 1, 0, 0);
}
Expand Down

0 comments on commit db46845

Please sign in to comment.