diff --git a/gradle.properties b/gradle.properties index 617223c..86ddcaf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx2G # boilerplate modId = pmr modName = PerspectiveModRedux -version = 0.0.4 +version = 0.0.5 acceptedMinecraftVersions = [1.8.9] minecraftVersion = 1.8.9 forgeVersion = 11.15.1.2318-1.8.9 diff --git a/src/main/java/pm/c7/pmr/PerspectiveMod.java b/src/main/java/pm/c7/pmr/PerspectiveMod.java index 310043e..d8b0733 100644 --- a/src/main/java/pm/c7/pmr/PerspectiveMod.java +++ b/src/main/java/pm/c7/pmr/PerspectiveMod.java @@ -41,6 +41,7 @@ public class PerspectiveMod private boolean showConfig = false; private static boolean holdToUse = false; + private static boolean lookForwards = false; public boolean perspectiveEnabled = false; public float cameraPitch; @@ -109,7 +110,11 @@ public void onKey(InputEvent.KeyInputEvent event) { this.held = true; this.cameraPitch = this.client.thePlayer.rotationPitch; - this.cameraYaw = this.client.thePlayer.rotationYaw + 180.0F; + if(lookForwards) { + this.cameraYaw = this.client.thePlayer.rotationYaw - 180.0F; + } else { + this.cameraYaw = this.client.thePlayer.rotationYaw; + } this.client.gameSettings.thirdPersonView = 1; } @@ -118,7 +123,11 @@ public void onKey(InputEvent.KeyInputEvent event) { this.perspectiveEnabled = !this.perspectiveEnabled; this.cameraPitch = this.client.thePlayer.rotationPitch; - this.cameraYaw = this.client.thePlayer.rotationYaw; + if(lookForwards) { + this.cameraYaw = this.client.thePlayer.rotationYaw - 180.0F; + } else { + this.cameraYaw = this.client.thePlayer.rotationYaw; + } this.client.gameSettings.thirdPersonView = this.perspectiveEnabled ? 1 : 0; } @@ -136,7 +145,7 @@ public void cameraSetup(EntityViewRenderEvent.CameraSetup event) { public static void saveConfig() { holdToUse = config.getBoolean("Hold To Use", "main", false, null); - + lookForwards = config.getBoolean("Look Forwards", "main", true, null); config.save(); }