aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/me/djtheredstoner/perspectivemod/PerspectiveMod.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/me/djtheredstoner/perspectivemod/PerspectiveMod.java b/src/main/java/me/djtheredstoner/perspectivemod/PerspectiveMod.java
index 34e3b13..afa0e49 100644
--- a/src/main/java/me/djtheredstoner/perspectivemod/PerspectiveMod.java
+++ b/src/main/java/me/djtheredstoner/perspectivemod/PerspectiveMod.java
@@ -52,9 +52,9 @@ public class PerspectiveMod {
@SubscribeEvent
public void tick(TickEvent.RenderTickEvent event) {
boolean down = GameSettings.isKeyDown(perspectiveKey);
- if(down != prevState && mc.currentScreen == null) {
+ if(down != prevState && mc.currentScreen == null && mc.theWorld != null && mc.thePlayer != null) {
prevState = down;
- onPressed(0, down);
+ onPressed(down);
}
}
@@ -72,7 +72,7 @@ public class PerspectiveMod {
}
}
- public void onPressed(int eventKey, boolean state) {
+ public void onPressed(boolean state) {
if (config.modEnabled) {
if (state) {
perspectiveToggled = !perspectiveToggled;