Fix keybinding conflicts on 1.14+ (fixes #268)

This fixes both, replay-exclusive keybindings blocking vanilla ones as well as
vanilla keybindings blocking replay-exclusive ones.

The magic happens in Mixin_ContextualKeyBindings.
This commit is contained in:
Jonas Herzig
2020-07-25 21:34:30 +02:00
parent 063657af4c
commit fd7b6030f9
11 changed files with 105 additions and 22 deletions

View File

@@ -82,13 +82,13 @@ public class ReplayModSimplePathing extends EventRegistrations implements Module
pathPreview.registerKeyBindings(registry);
core.getKeyBindingRegistry().registerKeyBinding("replaymod.input.keyframerepository", Keyboard.KEY_X, () -> {
if (guiPathing != null) guiPathing.keyframeRepoButtonPressed();
});
}, true);
core.getKeyBindingRegistry().registerKeyBinding("replaymod.input.clearkeyframes", Keyboard.KEY_C, () -> {
if (guiPathing != null) guiPathing.clearKeyframesButtonPressed();
});
}, true);
core.getKeyBindingRegistry().registerRepeatedKeyBinding("replaymod.input.synctimeline", Keyboard.KEY_V, () -> {
if (guiPathing != null) guiPathing.syncTimeButtonPressed();
});
}, true);
core.getKeyBindingRegistry().registerRaw(Keyboard.KEY_DELETE, () -> {
if (guiPathing != null) guiPathing.deleteButtonPressed();
});