Changed KeyInputHandler not to oppress Key Inputs when not in Replay
This commit is contained in:
@@ -102,7 +102,6 @@ public class ReplayMod {
|
||||
MinecraftForge.EVENT_BUS.register(guiEventHandler = new GuiEventHandler());
|
||||
|
||||
FMLCommonHandler.instance().bus().register(keyInputHandler);
|
||||
MinecraftForge.EVENT_BUS.register(keyInputHandler);
|
||||
FMLCommonHandler.instance().bus().register(mouseInputHandler);
|
||||
MinecraftForge.EVENT_BUS.register(mouseInputHandler);
|
||||
|
||||
|
||||
@@ -112,11 +112,6 @@ public class KeyInputHandler {
|
||||
for(KeyBinding kb : keyBindings) {
|
||||
if(!kb.isKeyDown()) continue;
|
||||
|
||||
if(kb.getKeyDescription().equals("key.chat") && kb.isPressed()) {
|
||||
mc.displayGuiScreen(new GuiMouseInput(ReplayMod.overlay));
|
||||
break;
|
||||
}
|
||||
|
||||
handleCustomKeybindings(kb, found, -1);
|
||||
found = true;
|
||||
}
|
||||
@@ -135,6 +130,10 @@ public class KeyInputHandler {
|
||||
|
||||
if(!ReplayHandler.isInReplay()) return;
|
||||
|
||||
if(kb.getKeyDescription().equals("key.chat") && (kb.isPressed() || kb.getKeyCode() == keyCode)) {
|
||||
mc.displayGuiScreen(new GuiMouseInput(ReplayMod.overlay));
|
||||
}
|
||||
|
||||
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_PLAY_PAUSE) && (kb.isPressed() || kb.getKeyCode() == keyCode) && !ReplayHandler.isInPath()) {
|
||||
ReplayMod.overlay.togglePlayPause();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user