Community listing page, reviews here may not be monitored by the author.
Night Auto Config
No reviews yet
Serialize everything! Night Config integration for Auto Config.
Neoforge is a fork of the Minecraft Forge available for versions 1.20.1+ of Minecraft. Many Forge mods are compatible with Neoforge and vice versa.
Fabric is a mod loader for versions 1.14+ of Minecraft, particularly popular for client side and optimization mods.
Quilt is a fork of the Fabric mod loader. Many Fabric mods are compatible with Quilt and vice versa.
Community voices
Reviews
Filters
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
Works on the client or the server alone, but does more when on both.
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
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 latesttag nameof 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.SerdeDefaultfor basic compatibilities! Otherwise, serialization exceptions may happen casually.
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 {
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 latesttag nameof 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.SerdeDefaultfor basic compatibilities! Otherwise, serialization exceptions may happen casually.
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers