File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/java/me/djtheredstoner/perspectivemod Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,9 @@ public void init(FMLInitializationEvent event) {
5252 @ SubscribeEvent
5353 public void tick (TickEvent .RenderTickEvent event ) {
5454 boolean down = GameSettings .isKeyDown (perspectiveKey );
55- if (down != prevState && mc .currentScreen == null ) {
55+ if (down != prevState && mc .currentScreen == null && mc . theWorld != null && mc . thePlayer != null ) {
5656 prevState = down ;
57- onPressed (0 , down );
57+ onPressed (down );
5858 }
5959 }
6060
@@ -72,7 +72,7 @@ public void onWorldLoad(WorldEvent.Load event) {
7272 }
7373 }
7474
75- public void onPressed (int eventKey , boolean state ) {
75+ public void onPressed (boolean state ) {
7676 if (config .modEnabled ) {
7777 if (state ) {
7878 perspectiveToggled = !perspectiveToggled ;
You can’t perform that action at this time.
0 commit comments