Forge's Config Annotation System Not Compatible With Forgelin
AlexCouch opened this issue ยท 3 comments
When I try using a Config annotation for a simple class with a property inside marked with JvmStatic, it doesn't appear in the config file generated by forge. When I switch to Java, it's in there.
You need to use @JvmField
instead of @JvmStatic
.
Forge's config system uses reflection to search for fields, while Kotlin uses properties. @JvmField
will tell the compiler to expose the variable as a field, while @JvmStatic
will generate static instances both within the enclosing class, as well as an instance method.