diff --git a/.gitignore b/.gitignore index ce9c92df4..79dab35e6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.setting libs/ +lib/ # Mobile Tools for Java (J2ME) .mtj.tmp/ diff --git a/src/main/java/cn/academy/client/render/misc/RailgunHandEffect.java b/src/main/java/cn/academy/client/render/misc/RailgunHandEffect.java index 1eddf6e8f..4e7ab8e3a 100644 --- a/src/main/java/cn/academy/client/render/misc/RailgunHandEffect.java +++ b/src/main/java/cn/academy/client/render/misc/RailgunHandEffect.java @@ -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); }