-
-
Notifications
You must be signed in to change notification settings - Fork 58
Description
In this WIKI page, the Controlify documentation suggests registering bindings in onControlifyInit using InitContext.bindings(), which is still available in version 2.4.2.
However, Controlify also locks binding registration before onControlifyInit is called. This means the only valid place to register custom Controlify-supported bindings is onControlifyPreInit.
But PreInitContext does not have a bindings() method—only guideRegistries. The docs state that this phase is intended for guide registration.
The only workaround is to call ControlifyBindApi.get().registerBinding inside onControlifyPreInit.
There are three main issues here:
- If bindings are meant to be registered in
onControlifyPreInit, the documentation should be updated, and it would be better to add abindings()method so users don’t need to callControlifyBindApi.get()directly. Controlify should manage the instance internally. - If bindings are not meant to be registered in
onControlifyPreInit, thenInitContext.bindingsshould be deprecated, and the documentation should clearly state where bindings should be registered instead. BindingSupplierhas been replaced withInputBindingSupplier, but the WIKI is still outdated.
This would help eliminate confusion (e.g., #696) for developers using this API and encourage more mods to adopt and support Controlify integration.