Nova-Committee / ModernKeyBinding

Other
17 stars 1 forks source link

Modifiers not working with AMECS in 1.20.1 Fabric #15

Open Hexblood opened 4 months ago

Hexblood commented 4 months ago

Something about Modern Keybinding is conflicting with AMECS. With both installed you can no longer assign modifier keys for bindings. Instead the last key pressed will be filled in.

MC 1.20.1 Modern Keybinding Fabric-1.20.X-1.2.0 AMECS 1.3.10+mc.1.20.1 Fabric 0.15.11 Fabric API 0.92.2+1.20.1

I would love to be able to use both mods in the pack I am building but this issue is a game breaker for me. I will be unable to use this mod as well as the mods I have that use your mod as a dependency.

MikhailTapio commented 4 months ago

Which mods are using mine as a dependency? In fact using any of MKB and Amecs as a hard dependency is stupid.

Salandora commented 4 months ago

That would be my Sophisticated Mods fabric ports. I agree using MKB as a hard dependency was stupid but it was providing the necessary functionality to bring the port forward. I'm currently looking into removing the hard dependency.

MikhailTapio commented 4 months ago

Try implementing things like this:

if (FabricLoader.getInstance().isModLoaded("mkb") && keybinding instanceof IKeyBinding extended) {
    extended.setKeyModifierAndCode(xxx, xxx);
}