forked from Clones/Controlify
fix bugs:
fix reconnecting controllers are unidentified fix some mod keybinds failing to register fix crash with unmapped joysticks
This commit is contained in:
@ -417,7 +417,12 @@ public class ControllerBindings<T extends ControllerState> {
|
||||
continue;
|
||||
|
||||
try {
|
||||
var identifier = new ResourceLocation("fabric-key-binding-api-v1", keyMapping.getName());
|
||||
var idPath = keyMapping.getName()
|
||||
.toLowerCase()
|
||||
.replaceAll("[^a-z0-9/._-]", "_")
|
||||
.trim();
|
||||
|
||||
var identifier = new ResourceLocation("fabric-key-binding-api-v1", idPath);
|
||||
BooleanSupplier toggleOverride = () -> false;
|
||||
if (keyMapping instanceof ToggleKeyMapping toggleKeyMapping) {
|
||||
toggleOverride = ((ToggleKeyMappingAccessor) toggleKeyMapping).getNeedsToggle();
|
||||
|
Reference in New Issue
Block a user