Configurable Mod (1.21.10, 1.20.1) is a compile/runtime config library that allows config settings to be decentralised, centralised or a combination of both if you like. The premise behind Configurable is everything is done for you, so all you need to worry about is what you want to configure.

Features:

The configurable.properties file tells Configurable what name the config should use and how to serialize it. It is expected at the project root (via System.getProperty(user.dir)).

  • name
    • Mandatory
    • Case Sensitive
  • type
    • Optional
    • Accepts toml, json5
    • Case Insensitive
    • Default: json5
  • naming_policy
    • Optional
    • Accepts: IDENTITY, UPPER_CASE_WITH_UNDERSCORES, LOWER_CASE_WITH_UNDERSCORES, LOWER_CASE_WITH_DASHES, LOWER_CASE_WITH_DOTS
    • Case Insensitive
    • Default: LOWER_CASE_WITH_UNDERSCORES

Example:

name=my_config  
type=toml  
naming_policy=lower_case_with_dashes

The core of this library is the @Configurable annotation. It lets you declare configuration fields.

  • Defaults: The default value is whatever the field is assigned at compile time. If deserialization fails or validation rejects it, it falls back to default (if validator allows).
  • Keys: By default, the key name is the field name in lower_case_with_underscores. You can override it by passing a custom key to @Configurable. You can also customize naming via the naming_policy in properties.
  • Groups: You can group config entries:
    • Example: @Configurable(group = "your_group")
    • Supports nested groups: e.g. group = "your_group.your_deep_group"
  • Comments: Javadoc comments on a @Configurable field are copied into the generated config. Non-Javadoc comments are not included.
  • Syncing: By default, entries sync to clients (via ConfigurableApi.saveChanges). You can disable sync with @Configurable(sync = false).
  • onSet: Use the onSet attribute to specify a method reference (public static void) that will run when the field is set. It receives the new value and a boolean indicating if it was from sync.

The @Validator annotation defines validation logic for a @Configurable field.

  • Validator Method: The value attribute should reference a method (public static boolean) that accepts the field’s type. Format: package.Class#method or just the method name if in same class.
  • Fallback: A boolean (default true). If parsing fails or validation fails, fallback to the compile-time default only if fallback is true.
  • Message: You can supply a literal or a method reference (public static String) for a custom error message if validation fails (and fallback=false).
  • Min/Max: For numeric types, instead of a custom validator method you can specify min and max. If you also supply a method, min/max are ignored.
  • Note: If the field is missing or cannot be parsed, the validator may receive null (if wrapper types allowed).

Requires:

Fabric API or NeoForge Installer

How to install:

Click the following link to view details: How to Install Mods for Minecraft Java Edition on PC: A Beginner Guide

Configurable Mod (1.21.10, 1.20.1) Download Links

For Minecraft 1.20.1, 1.20

Fabric Version: Download from Server 1Download from Server 2

For Minecraft 1.21.1, 1.21

Fabric Version: Download from Server 1Download from Server 2

NeoForge Version: Download from Server 1Download from Server 2

For Minecraft 1.21.3

Fabric Version: Download from Server 1Download from Server 2

NeoForge Version: Download from Server 1Download from Server 2

For Minecraft 1.21.5, 1.21.4

Fabric Version: Download from Server 1Download from Server 2

NeoForge Version: Download from Server 1Download from Server 2

For Minecraft 1.21.8, 1.21.7, 1.21.6

Fabric Version: Download from Server 1Download from Server 2

NeoForge Version: Download from Server 1Download from Server 2

For Minecraft 1.21.10, 1.21.9

Fabric Version: Download from Server 1Download from Server 2

NeoForge Version: Download from Server 1Download from Server 2

Click to rate this post!
[Total: 0 Average: 0]