MaLiLib (Forge)

MaLiLib (Forge)

291k Downloads

[Suggestion] Add MaLiLib keybind to vanilla

barraIhsan opened this issue ยท 4 comments

commented

So now the vanilla keybind (Options > Controls) use the MaLiLib keybind (multiple hotkey / key combination, and some advanced settings).
Why?
Because like 9/10 mods is using the vanilla keybind. Some other mod, use vanilla keybind in their own gui (So you cant use multiple hotkey / key combination)

If you don't understand, so this is the MaLiLib keybind :
image
and this is the vanilla keybind :
image

So basically I want the MaLiLib keybind override the vanilla keybind

commented

It's not "possible" to just make everything in vanilla use malilib's keybind. (Or rather in the case of vanilla it would be extremely tedious and require a ton of Mixins all over the place.) And in case of other mods it's simply not possible to do that from malilib's side... I'm pretty sure. Unless the vanilla keybinding class could be modified to work like this, but it's not really used the same way so I don't think it's feasible.

In any case I'm not going to be doing this invasive changes in malilib, as it's supposed to be a "safe" library-ish mod for other mods to use, so ideally I want malilib itself to modify the game as little as possible.

Other mods could simply use malilib for their keybinds if they wanted to, it's up to the author of each mod to decide if they want to depend on malilib or not. Also the current versions are not really that nice in some/many areas of the code, but the rewritten version I'm working on will improve lots of things and make stuff easier and simpler to do for mods that use malilib. So any mods that might want to start using malilib, might want to wait until this upcoming version is finished.

commented

What about when you want to set the keybind in vanilla (click the box) then, the malilib hotkey shows up?

commented

What would that do? The problem is not the config menu part of things, that would be fairly easy to replace/override, the problem is the way the hotkeys are checked and used, which is not easy/simple to replace/change.

If you just override the config buttons, then you just have a bunch of malilib hotkeys that do nothing. Unless they are each assigned a callback that does the same action as the vanilla keys... but that would break all other mods' assumptions of how the input handling works in the game, and also it would not be possible to do that automatically for any mod-added hotkeys.

commented

Yes but I think I found a mod with similar behaviour, but this mod allows you to search a hotkey and then activated it. Maybe instead replace the searching thing with a hotkey. Maybe you could do that? I just realise that the owner says it cant because a limitation?
image