Night Auto Config Mod (1.21.1, 1.20.1) is a Night Config integration for Auto Config, which is now embedded in the Cloth Config API. This config introduces a “NightConfigSerializer” to satisfy Auto Config’s requirement of a serializer’s implementation. You can choose from all the available config formats of Night Config, and use the serializer just as other common serializers, even along with a “PartitioningSerializer”. As a library mod, this mod by itself does not introduce anything into the game. But it is required to be installed as a dependency mod for other mods to function as intended.

Features:

  • NightConfigSerializer implementation that fulfills Auto Config’s serializer requirement.
  • Supports all configuration formats provided by Night Config (e.g. JSON, TOML, HOCON, etc.).
  • Can be used like any other Auto Config serializer, including together with a PartitioningSerializer.
  • Provides runtime annotations to define serializer and deserializer providers:
    • @SerializerProvider for registering custom serializer providers.
    • Full support for Night Config’s own annotations such as @SerdeDefault.
  • Includes convenience interfaces such as UnifiedSerializerProvider<T, R> that implement both ValueSerializer<T, R> and ValueSerializerProvider<T, R>.
  • Supports custom value serializers for your own types (e.g. MyClass), referenced via providers.
  • Allows defining default values via provider methods, used together with @SerdeDefault to avoid random serialization exceptions.

Integration Highlights

  • Distributed as a mod library; recommended consumption via JitPack in build.gradle or build.gradle.kts.
  • Version is controlled via nightautoconfig_version in gradle.properties (replace {latest} with the latest tag).
  • Must be referenced as a dependency in fabric.mod.json / quilt.mod.json:
    • "nightautoconfig": "*" under "depends".
  • Serializer implementation entry point:
    • band.kessokuteatime.nightautoconfig.config.NightConfigSerializer
  • Configuration classes use Auto Config’s @Config and Night Auto Config’s annotations to declare how fields are serialized.
  • Registration is done during mod initialization:
    • AutoConfig.register(MyConfig.class, ConfigType.DEFAULT_COMMENTED::fileWatcherSerializer)

Important Notes

  • Fields should be annotated with com.electronwill.nightconfig.core.serde.annotations.SerdeDefault where appropriate to ensure stable defaults.
  • Omitting @SerdeDefault on fields that rely on provider-based defaults may cause unexpected serialization exceptions.
  • Configuration objects can use transient suppliers for default values while exposing the actual stored field separately.

Screenshots:

Requires:

Fabric API or Quilt Loader or NeoForge Installer

Cloth Config API

How to install:

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

Night Auto Config Mod (1.21.1, 1.20.1) Download Links

For Minecraft 1.20.6, 1.20.4, 1.20.2, 1.20.1, 1.20

Fabric/Quilt version: Download from Server 1 Download from Server 2

For Minecraft 1.21.1, 1.21

Fabric/Quilt version: Download from Server 1Download from Server 2

NeoForge version: Download from Server 1Download from Server 2

Click to rate this post!
[Total: 1 Average: 5]