Community listing page, reviews here may not be monitored by the author.
Prism Config
No reviews yet
A lightweight config library for Java to let you write your config elegantly and flexibly. Theoretically standalone from any loaders.
Provides a framework or library for other mods to use.
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
Getting Started
For users, Prism Config can be installed as a Fabric mod natively as it includes a fabric.mod.json, but it is mostly for JiJ, and the mod itself is actually just a normal Java library, so it can theoretically run on any Minecraft version with any loader. However, support for specific mods, like Mod Menu, is planned.
For developers, to add Prism Config to your project, you need to add following into your build.gradle(.kts):
Groovy DSL:
repositories {
// ...
maven {
name = "Nova Committee - Release"
url = "https://maven.nova-committee.cn/releases/"
}
maven {
name = "Nova Committee - Snapshot"
url = "https://maven.nova-committee.cn/snapshots/"
}
}
dependencies {
// ...
implementation "io.github.prismwork:prismconfig:0.2.0:all"
// Or use the slim jar if you have the libraries included in your project (Gson, Jankson...)
// implementation "io.github.prismwork:prismconfig:0.2.0"
}
Kotlin DSL:
repositories {
// ...
maven {
name = "Nova Committee - Release"
url = uri("https://maven.nova-committee.cn/releases/")
}
maven {
name = "Nova Committee - Snapshot"
url = uri("https://maven.nova-committee.cn/snapshots/")
}
}
dependencies {
// ...
implementation("io.github.prismwork:prismconfig:0.2.0:all")
// Or use the slim jar if you have the libraries included in your project (Gson, Jankson...)
// implementation("io.github.prismwork:prismconfig:0.2.0")
}
Prism Config by default provides serializers and deserializers for JSON (Gson), JSON5 (Jankson) and TOML 0.4.0 (toml4j).
To parse a config from string into object, you can do this:
String content;
MyConfig config = PrismConfig.getInstance().serialize(
MyConfig.class,
content,
DefaultSerializers.getInstance().json5(MyConfig.class) // We assume that your config is written in JSON5
);
To parse a config from object into string, you can do this:
MyConfig content;
String config = PrismConfig.getInstance().deserialize(
MyConfig.class,
content,
DefaultDeserializers.getInstance().json5(MyConfig.class) // We assume that your config is written in JSON5
);
You can also write it to a file:
MyConfig content;
File configFile;
PrismConfig.getInstance().deserializeAndWrite(
MyConfig.class,
content,
DefaultDeserializers.getInstance().json5(MyConfig.class), // We assume that your config is written in JSON5
configFile
);
To write your own serializer/deserializer, you can use the following code (we use serializing as an example):
String content;
PrismConfig.getInstance().serialize(
MyConfig.class,
content,
(string) -> {
// Do your own parsing here
}
);
Libraries Used
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