Annotations
You can progressively enhance config options with annotations.
@Space
Section titled “@Space”This will add a space above the option. By default this is 10 pixels, but you can change the value. Spaces appear before headers and paragraphs.
Example:
public int anIntOption = 0;@Space()public int anotherIntOption = 0;@Space(20)public int oneLastIntOption = 0;@Header
Section titled “@Header”This will add a header above the option, using the translation key config.<MODID>.header.<HEADER>. Headers appear between spaces and paragraphs.
Example:
@Header("my_header")public int anIntOption = 0;@Paragraph
Section titled “@Paragraph”This will add a paragraph above the option, using the translation key config.<MODID>.paragraph.<PARAGRAPH>. Paragraphs appear after spaces and headers.
Example:
@Paragraph("my_paragraph")public int anIntOption = 0;@Alpha
Section titled “@Alpha”This will enable the alpha component on Color options.
Example:
@Alphapublic Color aColorOption = new Color(255, 255, 255, 127);This will hide the option from the config screen.
Example:
@Hidepublic boolean aSecretOption = false;@Ignored
Section titled “@Ignored”This will ignore the option and will not serialize or parse it. This is useful if the variable is internal or it is not a supported type and you want to suppress the warning.
@Header, @Paragraph, and @Space annotations will still be parsed, so it can also be useful to use ignored options to place them where it would otherwise be impossible to do so.
Example:
public class MyConfig extends BentoConfig<MyConfig> { public int anIntOption = 0; @Paragraph("conclusion") @Ignored private int conclusion = 0;}