File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/main/java/micdoodle8/mods/galacticraft/core/client Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,16 @@ public void keyTick(Type type, boolean tickEnd)
117117 int keyCode = keyBinding .getKeyCode ();
118118 if (keyCode == Keyboard .KEY_NONE )
119119 continue ;
120- boolean state = keyCode < 0 ? Mouse .isButtonDown (keyCode + 100 ) : Keyboard .isKeyDown (keyCode );
120+ boolean state ;
121+ try
122+ {
123+ state = keyCode < 0 ? Mouse .isButtonDown (keyCode + 100 ) : Keyboard .isKeyDown (keyCode );
124+ } catch (IndexOutOfBoundsException e )
125+ {
126+ GalacticraftCore .logger .error ("Invalid keybinding! " + keyBinding .getKeyDescription ());
127+ continue ;
128+ }
129+
121130 if (state != this .keyDown [i + this .keyBindings .length ] || state && this .vRepeatings [i ])
122131 {
123132 if (state )
You can’t perform that action at this time.
0 commit comments