ZConfig
No reviews yet
A mixin config mod with override loading from other mods
Community voices
Reviews
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
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
Why does this project exist?
This is a general purpose config mod slightly based on c2me's internal config system. This also lets me reduce zfastnoise's size to a few dozen kilobytes and users only have to download the config mod once.
Features
- Toml based config files
- boolean and int based config entries
- allow other mods to override config entries using mod metadata
- mark mods as incompatible with certain config entries
For example, fabric.mod.json
{
...
"custom": {
"zfastnoise:overrides" : "mixin.perf.surface"
}
}
The above disables mixin.perf.surface config option
Future plans
- add support for modmenu/forge config api
- add neoforge builds
- add more sugar to easily generate config
Example config
package org.codeberg.zenxarch.zconfig.test;
import org.codeberg.zenxarch.zconfig.entry.BooleanConfigEntry;
import org.codeberg.zenxarch.zconfig.entry.ConfigEntries;
import org.codeberg.zenxarch.zconfig.entry.IntConfigEntry;
import org.codeberg.zenxarch.zconfig.loader.Config;
import org.codeberg.zenxarch.zconfig.loader.ConfigLoader;
import org.codeberg.zenxarch.zconfig.loader.OverrideCollector;
import org.junit.jupiter.api.Test;
public class ExampleConfig extends ConfigEntries {
public static final ExampleConfig INSTANCE = new ExampleConfig();
public static final BooleanConfigEntry MAIN =
INSTANCE.createEntry(
"main",
builder -> builder.addComment("Main entry").defaultValue(false).addIncompat("sodium"));
public static final IntConfigEntry OTHER =
INSTANCE.createIntEntry(
"other", builder -> builder.addComment("Other entry").defaultValue(0).constraints(-1, 1));
public static final Config CONFIG =
new Config(
new ConfigLoader("example_mod_id", INSTANCE), new OverrideCollector("example_mod_id"));
@Test
public void loadConfig() {
IO.println(CONFIG.get(MAIN));
IO.println(CONFIG.get(OTHER));
IO.println(CONFIG.loadMixinEntries());
}
}
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