Back to mods
Night Auto Config project artwork

CurseForge · Minecraft mod

Night Auto Config

Serialize everything! Night Config integration for Auto Config.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Night Auto Config release should I use?

Updated 8 months ago
Latest stable file Night Auto Config 1.0.6 for Fabric 1.21+
Game version 1.21, 1.21.1, 1.21.2
Loader Fabric, Quilt

Night Auto Config 1.0.6 for Fabric 1.21+ targets 1.21, 1.21.1, 1.21.2 with Fabric, Quilt. The project page does not say whether it belongs on the client. The project page does not say whether it belongs on the dedicated server. All 3 required mods have matching files.

Where it goes

Is Night Auto Config required on the client, server, or both?

The project page does not say whether it belongs on the client. The project page does not say whether it belongs on the dedicated server.

Client Source doesn’t say
Dedicated server Source doesn’t say
Loader for this release Fabric, Quilt
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source does not explicitly classify this release as client-only or server-only.

What else does Night Auto Config 1.0.6 for Fabric 1.21+ need?

Night Auto Config 1.0.6 for Fabric 1.21+. Change the file and its required mods may change too.

All 3 required mods have matching files

Install Fabric API, Cloth Config API (Fabric/Forge/NeoForge), Cloth Config API first. We found matching files for this game-version and loader setup.

Fabric API Needed by Night Auto Config 1.0.6 for Fabric 1.21+
required
Matching file found Matched file: [1.21.1] Fabric API 0.116.15+1.21.1
Cloth Config API Needed by Night Auto Config 1.0.6 for Fabric 1.21+
required
Matching file found Matched file: 17.0.144+fabric

We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add Night Auto Config without breaking your instance.

Built for Night Auto Config 1.0.6 for Fabric 1.21+. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use Night Auto Config 1.0.6 for Fabric 1.21+. It targets 1.21, 1.21.1, 1.21.2 with Fabric, Quilt; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    Install Fabric API, Cloth Config API (Fabric/Forge/NeoForge), Cloth Config API first. We found matching files for this game-version and loader setup.

  3. 03

    Put it on the correct side

    The project page does not say whether it belongs on the client. The project page does not say whether it belongs on the dedicated server.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside Night Auto Config 1.0.6 for Fabric 1.21+. It opens that exact file at the source.

About this project

What does Night Auto Config add?

Night Auto Config

Serialize everything! Night Auto Config is a Night Config integration for Auto Config (now embedded in Cloth Config).

Implementation

Night Auto 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.

Add to Your Project

It is recommended to use JitPack to implement Night Auto Config into your project.

Groovy

build.gradle
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 DSL

build.gradle.kts
repositories {
	maven { url = uri("https://jitpack.io") }
}

dependencies {
	modAi("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 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
{
	"depends": {
		"nightautoconfig": "*"
	}
}

Usage

The serializer implementation is at band.kessokuteatime.nightautoconfig.config.NightConfigSerializer.

Here's a brief example:

MyConfig.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<String> 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<T, R>` satisfies both `ValueSerializer<T, R>` and `ValueSerializerProvider<T, R>`
    public static class MyClassSerializerProvider implements UnifiedSerializerProvider<MyClass, String> {
        // ...
    }
    
    // A custom serializer provider for `MyClass` is already specified at type definition
    public MyClass someInstance = new MyClass();
}

MyMod.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.

Please annotate your fields with com.electronwill.nightconfig.core.serde.annotations.SerdeDefault for basic compatibilities! Otherwise, serialization exceptions may happen casually.

Project description from CurseForge.

Pick your setup

Night Auto Config by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

25 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Night Auto Config versions and loaders

13 of 13 releases match

Looking for an older file? The official CurseForge project page is in Resources.