From d5fec4d1e57c63ff26d52c67f628e1f8d984bbce Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Tue, 17 Mar 2015 03:28:17 -0400 Subject: [PATCH] That's one mystery solved --- .../java/crazypants/render/VertexRotationFacing.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/crazypants/render/VertexRotationFacing.java b/src/main/java/crazypants/render/VertexRotationFacing.java index 6ece5acd..a0ddcf1b 100644 --- a/src/main/java/crazypants/render/VertexRotationFacing.java +++ b/src/main/java/crazypants/render/VertexRotationFacing.java @@ -5,6 +5,8 @@ import crazypants.vecmath.Vector3d; public class VertexRotationFacing extends VertexRotation { + private static final double ROTATION_AMOUNT = Math.PI / 2; + private ForgeDirection defaultDir; public VertexRotationFacing(ForgeDirection defaultDir) { @@ -12,18 +14,15 @@ public class VertexRotationFacing extends VertexRotation { this.defaultDir = defaultDir; } - // No I have no idea why this value works. - private double rotationAmount = 1.571; - public void setRotation(ForgeDirection dir) { if(dir == defaultDir) { setAngle(0); } else if(dir == defaultDir.getOpposite()) { - setAngle(rotationAmount * 2); + setAngle(ROTATION_AMOUNT * 2); } else if(dir == defaultDir.getRotation(ForgeDirection.DOWN)) { - setAngle(rotationAmount); + setAngle(ROTATION_AMOUNT); } else { - setAngle(rotationAmount * 3); + setAngle(ROTATION_AMOUNT * 3); } } }