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)
117
117
int keyCode = keyBinding .getKeyCode ();
118
118
if (keyCode == Keyboard .KEY_NONE )
119
119
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
+
121
130
if (state != this .keyDown [i + this .keyBindings .length ] || state && this .vRepeatings [i ])
122
131
{
123
132
if (state )
You can’t perform that action at this time.
0 commit comments