isXander / isXander/Controlify

Controlify Bindings API docs is outdated or invalid

Open
#696 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
341
Forks
97
Avg merge
1h
Merged PRs (30d)
1

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 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., https://github.com/isXander/Controlify/issues/696) for developers using this API and encourage more mods to adopt and support Controlify integration.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Controlify.java registration-locking code, ControlifyEntrypoint.java, and the InitContext and PreInitContext APIs, then compare them with the bindings API wiki section. Check the InputBindingSupplier name and registration examples against version 2.4.2. Done means the documented lifecycle, available context methods, and binding supplier type agree with the implemented API.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.