1
0
forked from Clones/Controlify

better binding api and look sensitivity

This commit is contained in:
isXander
2023-02-01 15:04:18 +00:00
parent 4ea05b9dbf
commit b77a5361ad
10 changed files with 64 additions and 36 deletions

View File

@ -19,9 +19,9 @@ public class ControlifyEvents {
}
});
public static final Event<ControllerBindRegistry> CONTROLLER_BIND_REGISTRY = EventFactory.createArrayBacked(ControllerBindRegistry.class, callbacks -> bindings -> {
public static final Event<ControllerBindRegistry> CONTROLLER_BIND_REGISTRY = EventFactory.createArrayBacked(ControllerBindRegistry.class, callbacks -> (bindings, controller) -> {
for (ControllerBindRegistry callback : callbacks) {
callback.onRegisterControllerBinds(bindings);
callback.onRegisterControllerBinds(bindings, controller);
}
});
@ -37,6 +37,6 @@ public class ControlifyEvents {
@FunctionalInterface
public interface ControllerBindRegistry {
void onRegisterControllerBinds(ControllerBindings bindings);
void onRegisterControllerBinds(ControllerBindings bindings, Controller controller);
}
}