Fixed ArrayIndexOutOfBoundsException when iterating over MouseInput KeyBindings

This commit is contained in:
CrushedPixel
2015-06-03 20:33:46 +02:00
parent 6152104df3
commit ccf3970bcc

View File

@@ -31,10 +31,12 @@ public class KeyInputHandler {
if(mc.currentScreen == null) {
for(KeyBinding kb : keyBindings) {
//don't act on Mouse inputs
if(kb.getKeyCode() < 0) continue;
if(!ReplayMod.replaySender.paused() && !kb.isKeyDown()) continue;
//keyCode has to be positive, otherwise it's a Mouse key and will horribly crash
if(ReplayMod.replaySender.paused() && kb.getKeyCode() >= 0 && !Keyboard.isKeyDown(kb.getKeyCode()))
if(ReplayMod.replaySender.paused() && !Keyboard.isKeyDown(kb.getKeyCode()))
continue;
try {