aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks
diff options
context:
space:
mode:
authorxTrM_ <26600206+xTrM-EN@users.noreply.github.com>2020-12-05 22:12:39 +0100
committerGitHub <noreply@github.com>2020-12-05 16:12:39 -0500
commit1ed4bd9177d3a6f3c23fd927e2096dd4da96f98e (patch)
tree066784ce42821a92267d3701b32e6db505116625 /src/main/java/me/djtheredstoner/perspectivemod/asm/hooks
parent09eaedf08b98205268b05ac245241f53a01fdcb5 (diff)
downloadPerspectiveModv4-1ed4bd9177d3a6f3c23fd927e2096dd4da96f98e.tar.gz
PerspectiveModv4-1ed4bd9177d3a6f3c23fd927e2096dd4da96f98e.tar.bz2
PerspectiveModv4-1ed4bd9177d3a6f3c23fd927e2096dd4da96f98e.zip
Fix NPE in EntityRenderHook (#9)
Diffstat (limited to 'src/main/java/me/djtheredstoner/perspectivemod/asm/hooks')
-rw-r--r--src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/EntityRendererHook.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/EntityRendererHook.java b/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/EntityRendererHook.java
index ebdfd88..a6ea788 100644
--- a/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/EntityRendererHook.java
+++ b/src/main/java/me/djtheredstoner/perspectivemod/asm/hooks/EntityRendererHook.java
@@ -23,7 +23,7 @@ public class EntityRendererHook {
}
public static boolean mouseHook(Minecraft minecraft) {
- return PerspectiveMod.instance.overrideMouse();
+ return PerspectiveMod.instance == null ? minecraft.inGameHasFocus : PerspectiveMod.instance.overrideMouse();
}
public static double distanceHook(double value) {