Prism Config

Prism Config

A lightweight config library for Java to let you write your config elegantly and flexibly. Theoretically standalone from any loaders.

by
500 Downloads
fabricquiltlibrary
Rent Server with this Mod

About this Mod

Icon

java8
gradle
Release

A lightweight config library for Java to let you write your config elegantly and flexibly.

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

  • Jankson by falkreon, licensed under MIT.
  • Gson by Google, licensed under Apache-2.0.
  • toml4j by Moandji Ezana, licensed under MIT.

Available Versions

Prism Config 0.2.0release
MC 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3fabric, quilt
December 23, 2022

How to Install Prism Config on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.19.3).

3

Install Mod

Open the mod browser in the dashboard and search for "Prism Config". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabricquilt

Minecraft Versions

1.19.3, 1.19.2, 1.19.1 (+20 more)

Server-side

~ Optional

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

Prism Config server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.19.3). You can switch loaders with one click in the panel.

Is Prism Config compatible with fabric and quilt?

Prism Config officially supports fabric, quilt for Minecraft 1.19.3, 1.19.2, 1.19.1. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with Prism Config – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Prism Config consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install Prism Config with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
MIT License
Server-side
Optional

Supported Versions

1.19.31.19.21.19.11.191.18.21.18.11.181.17.11.171.16.5+13 more