LibJF/docs/config/libjf-config-compiler-plugin-v2.md
JFronny ac374ca790
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/jfmod Pipeline was successful
ci/woodpecker/tag/docs Pipeline was successful
ci/woodpecker/tag/jfmod Pipeline was successful
[docs] Update for compiler plugin v2
2022-12-29 13:31:08 +01:00

819 B

libjf-config-compiler-plugin-v2

This annotation processor provides finds classes annotated with @JfConfig and produces the necessary code and registration for them. Using this is the recommended way to use libjf-config. Please be aware that the restrictions of the reflection implementation in regard to class loading will also apply to configs using the plugin if it is loaded during runtime.

Please note that your fabric.mod.json must reference the generated class, not your original config. If you plan on accessing your config before onInitialize, it is recommended that you call .ensureInitialized() on your generated class from your config classes static initializer as seen in the example.

The code necessary for using this annotation processor is available here