Mod

YACL Synced

Quick rating

YACL Synced

No reviews yet

An addon for YetAnotherConfigLib with server-client config synchronization

API/Library
Mod Loaders
NeoForge
Fabric
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

About

Project Details

Type
Mod
License
GNU Lesser General Public License v3.0 only
Latest Version
3.6.6.0+1.21.1-neoforge

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.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

YACL Synced

Enviroment Modrinth

An addon for YetAnotherConfigLib with server-client config synchronization.

This is a library mod and won't work without any mods that depend on this mod!!!

Why synced?

YACL is a config lib that helps developers create a config with beautiful config screen in Minecraft. But it doesn't support server-client config synchronization. YACL Synced is an addon for YACL that adds the feature.

For developers

Install

// build.gradle
repositories {
    maven { // Only needed for forge (YACL needs it)
        name = 'Kotlin for Forge'
        url = 'https://thedarkcolour.github.io/KotlinForForge/'
    }

    maven {
        name 'Xander Maven'
        url 'https://maven.isxander.dev/releases'
    }

    maven {
        name = "Tiger Maven"
        url = "https://maven.tigercrl.top/releases/"
    }
}

dependencies {
    modImplementation "top.tigercrl:YACLSynced-<common/fabric/neoforge>:<version>"
}

Usage

You can define a config in the same way as YACL but with SyncedConfigClassHandler.

public class CommonConfig {
    public static final ConfigClassHandler<CommonConfig> HANDLER = SyncedConfigClassHandler.createBuilder(CommonConfig.class)
            .id(YACLPlatform.rl("yacl3-test", "config"))
            .serializer(config -> GsonConfigSerializerBuilder.create(config)
                    .setPath(YACLPlatform.getConfigDir().resolve("yacl-test-v2.json5"))
                    .setJson5(true)
                    .build())
            .build();

    // ...
}

On both sides, you can use HANDLER.instance() in the same way to get the config instance.

On client side, you can also use HANDLER.localInstance() and HANDLER.remoteInstance() to get the local and remote config instances in a server.

Config mismatch detect

You can use @OptionFlags to define option flags for an autogen config

It's same as using Option.Builder.flag(...OptionFlag flag) in YACL

public class CommonConfig {
    @AutoGen(category = "test", group = "test")
    @SerialEntry(comment = "This option requires game restart")
    @OptionFlags({OptionFlags.FlagType.GAME_RESTART})
    @BooleanFlag
    public boolean myOption = true;
}

But by using @OptionFlags, YACL Synced will detect the config mismatch when joining a server and show a warning screen.

Screenshots

Gallery

This project has no gallery images yet.

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

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~1,000
Downloads
Last Updated
CurseForge
Modrinth
Created
Last synced
When ModDex last fetched and imported data for this project from CurseForge or Modrinth. High-traffic and active projects are checked more often.