Skip to content

Controlify Bindings API docs is outdated or invalid #696

@EchoEllet

Description

@EchoEllet

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 a bindings() method so users don’t need to call ControlifyBindApi.get() directly. Controlify should manage the instance internally.
  • If bindings are not meant to be registered in onControlifyPreInit, then InitContext.bindings should be deprecated, and the documentation should clearly state where bindings should be registered instead.
  • BindingSupplier has been replaced with InputBindingSupplier, 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions