Night Auto Config
Modby KrLite
Serialize everything! Night Config integration for Auto Config.
Type
Mod
CurseForge Downloads
11,119
CurseForge ID
1061154
Modrinth Downloads
200,232
Modrinth ID
HQpcCFZg
Last Updated
Oct 3, 2026
Description
build.gradle
```groovy repositories { maven { url "https://jitpack.io" } } dependencies { modApi "com.github.KessokuTeaTime:Night-Auto-Config:${project.nightautoconfig_version}" // You'll need to implement Cloth Config API here. } ```gradle.properties
``` nightautoconfig_version={latest} ``` Kotlin DSLbuild.gradle.kts
```kotlin repositories { maven { url = uri("https://jitpack.io") } } dependencies { modApi("com.github.KessokuTeaTime:Night-Auto-Config:${project.nightautoconfig_version}") // You'll need to implement Cloth Config API here. } ```gradle.properties
``` nightautoconfig_version={latest} ``` > You should replace `{latest}` with the latest [`tag name`](https://github.com/KessokuTeaTime/Night-Auto-Config/tags) of **Night Auto Config.** ### Reference as Dependency Don't forget to reference **Night Auto Config** as dependency in your mod's metadata.fabric.mod.json / quilt.mod.json
```json { "depends": { "nightautoconfig": "*" } } ``` ## Usage The serializer implementation is at [`band.kessokuteatime.nightautoconfig.config.NightConfigSerializer`](https://github.com/KessokuTeaTime/Night-Auto-Config/blob/fabric/1.21/src/main/java/band/kessokuteatime/nightautoconfig/config/NightConfigSerializer.java). Here's a brief example: `MyConfig.java` ```java // Use annotations provided by Night Auto Config to define serializer providers and deserializer providers at runtime! @SerializerProvider(MyClassSerializerProvider.class) @Config(name = "my_config") public class MyConfig implements ConfigData { // Something... private transient final Supplier someStringProvider = () -> "default"; // All Night Config annotations are available @SerdeDefault(provider = "someStringProvider") public String someString = someStringProvider.get(); // Night Auto Config provides some interfaces for convenience implementations // For example, `UnifiedSerializerProvider` satisfies both `ValueSerializer` and `ValueSerializerProvider` public static class MyClassSerializerProvider implements UnifiedSerializerProvider { // ... } // A custom serializer provider for `MyClass` is already specified at type definition public MyClass someInstance = new MyClass(); } ``` `MyMod.java` ```java public class MyMod implements ModInitializer { @Override public void onInitialize() { // Don't remember to register into Auto Config at initialize AutoConfig.register(NightExampleConfig.class, ConfigType.DEFAULT_COMMENTED::fileWatcherSerializer); } } ``` For runtime examples, checkout [this package.](https://github.com/KessokuTeaTime/Night-Auto-Config/blob/fabric/1.21/src/main/java/band/kessokuteatime/nightautoconfig/example/config) > Please annotate your fields with [`com.electronwill.nightconfig.core.serde.annotations.SerdeDefault`](https://github.com/TheElectronWill/night-config/blob/master/core/src/main/java/com/electronwill/nightconfig/core/serde/annotations/SerdeDefault.java) for basic compatibilities! Otherwise, serialization exceptions may happen casually.Compatibility
Mod Loaders
Game Versions
Recommended Gear
AffiliateHardware and extras that pair well with this mod.
As an Amazon Associate I earn from qualifying purchases.
Similar Mods
Otyacraft Engine [Forge/Fabric]
Felnull integration mod library.
Isle of Berk Addons
Unofficial Additions and QOL Tweaks for Isle of Berk
Chunky McChunkFace
A mod that adds a chunk loader which can be upgraded like a beacon
LegendRelicLib
This pre-library provides a collection of methods designed to eliminate repetitive steps.has more function
Chest Tracker
Remember where you've put items.
Panoramica [Forge]
Take cubic panorama screenshots like the one in the Title screen!