Skip to content

Conversation

@EchoEllet
Copy link
Contributor

Updates the documentation and Javadocs to make it more user-friendly and simplify integration with Controlify by:

  • Updating outdated references.
  • Adding Maven/dependency code snippets and the full file name dev.isxander.controlify.api.entrypoint.ControlifyEntrypoint to make it easier for NeoForge users to create in their IDE or terminal.
  • Documenting how to register a custom radial icon.
  • Clarifying the differences between onControlifyInit and onControlifyPreInit to resolve common confusion.

Related Issues

@EchoEllet EchoEllet force-pushed the docs/improve-public-api-docs branch from 86ba14e to 8e0e979 Compare October 31, 2025 21:38
@EchoEllet EchoEllet force-pushed the docs/improve-public-api-docs branch from 8e0e979 to f6b51ed Compare December 19, 2025 21:43
// You can change "compileOnly" to "implementation" for testing in-game.
compileOnly("dev.isxander:controlify:${project.controlify_version}") {
// Only need Controlify API, ignore the transitive dependencies (e.g, QuiltMC parsers)
transitive = false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to remove the QuiltMC Parser as a transitive dependency, rather than using this workaround?

This is more convenient, because it means users don't have to add YACL as a runtime only.

Without transitive = false (isTransitive in KTS) workaround, Quilt MC parsers will be added to consumers as compileOnly, and they have to add the QuiltMC Maven Repository to prevent build failure (e.g., dependency not found in the following sources).

@EchoEllet EchoEllet requested a review from isXander December 19, 2025 22:07
Comment on lines +114 to +120
CUSTOM(MyMod.rl("textures/item/custom.png")),;

private final @NotNull ResourceLocation id;

MyRadialIcons(@NotNull ResourceLocation id) {
this.id = id;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ResourceLocation was renamed to Identifier in 1.21.11+, so should we use that instead?

Comment on lines +49 to +50
// 2. Provide explicit Controlify support.
.keyEmulation(MyModKeyMappings.ACTION)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option 2 means no key emulation, and therefore, only addKeyCorrelation should be used.

I will improve this part soon.

Comment on lines +140 to +151
// For consistency with the current Controlify radial icons,
// this code is equivalent to:
// https://github.com/isXander/Controlify/blob/f5c94c57d5e0d4954e413624a0d7ead937b6e8ab/src/main/java/dev/isxander/controlify/bindings/RadialIcons.java#L106-L112
RadialIcons.registerIcon(location, (graphics, x, y, tickDelta) -> {
var pose = CGuiPose.ofPush(graphics);
pose.translate(x, y);
pose.scale(0.5f, 0.5f);
Blit.tex(graphics, location, 0, 0, 0, 0, 32, 32, 32, 32);
pose.pop();
});
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be worth considering making a public API that provides this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Controlify Bindings API docs is outdated or invalid

2 participants