{"id":28741040,"url":"https://github.com/tigercrl/yaclsynced","last_synced_at":"2025-08-24T17:43:52.278Z","repository":{"id":299089569,"uuid":"1002027809","full_name":"Tigercrl/YACLSynced","owner":"Tigercrl","description":"An addon for YetAnotherConfigLib with server-client config synchronization","archived":false,"fork":false,"pushed_at":"2025-06-14T15:32:12.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-14T16:37:13.170Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tigercrl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-14T15:02:25.000Z","updated_at":"2025-06-14T15:32:15.000Z","dependencies_parsed_at":"2025-06-14T16:37:14.842Z","dependency_job_id":"b8e5d2b4-6ca0-4f62-a817-e23a35588bc1","html_url":"https://github.com/Tigercrl/YACLSynced","commit_stats":null,"previous_names":["tigercrl/yaclsynced"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Tigercrl/YACLSynced","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tigercrl%2FYACLSynced","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tigercrl%2FYACLSynced/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tigercrl%2FYACLSynced/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tigercrl%2FYACLSynced/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tigercrl","download_url":"https://codeload.github.com/Tigercrl/YACLSynced/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tigercrl%2FYACLSynced/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271916159,"owners_count":24843192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-16T07:10:13.277Z","updated_at":"2025-08-24T17:43:52.202Z","avatar_url":"https://github.com/Tigercrl.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YACL Synced\n\n![Enviroment](https://img.shields.io/badge/Enviroment-Client%20\u0026%20Server-orange)\n[![Modrinth](https://img.shields.io/modrinth/dt/MaPrjRfi?color=00AF5C\u0026label=downloads\u0026logo=modrinth)](https://modrinth.com/mod/yacl-synced)\n\nAn addon for YetAnotherConfigLib with server-client config synchronization\n\n## Why synced?\n\nYACL is a config lib that helps developers create a config with beautiful config screen in Minecraft.\nBut it doesn't support server-client config synchronization.\nYACL Synced is an addon for YACL that adds the feature.\n\n## For developers\n\n### Install\n\n```groovy\n// build.gradle\nrepositories {\n    maven { // Only needed for forge\n        name = 'Kotlin for Forge'\n        url = 'https://thedarkcolour.github.io/KotlinForForge/'\n    }\n\n    maven {\n        name 'Xander Maven'\n        url 'https://maven.isxander.dev/releases'\n    }\n\n    maven {\n        name = \"Tiger Maven\"\n        url = \"https://maven.tigercrl.top/releases/\"\n    }\n}\n\ndependencies {\n    modImplementation \"top.tigercrl:YACLSynced-\u003ccommon/fabric/neoforge\u003e:\u003cversion\u003e\"\n}\n```\n\n### Usage\n\nYou can define a config in the same way as YACL but with `SyncedConfigClassHandler`.\n\n```java\npublic class CommonConfig {\n    public static final ConfigClassHandler\u003cCommonConfig\u003e HANDLER = SyncedConfigClassHandler.createBuilder(CommonConfig.class)\n            .id(YACLPlatform.rl(\"yacl3-test\", \"config\"))\n            .serializer(config -\u003e GsonConfigSerializerBuilder.create(config)\n                    .setPath(YACLPlatform.getConfigDir().resolve(\"yacl-test-v2.json5\"))\n                    .setJson5(true)\n                    .build())\n            .build();\n\n    // ...\n}\n```\n\nOn both sides, you can use `HANDLER.instance()` in the same way to get the config instance.\n\nOn client side, you can also use `HANDLER.localInstance()` and `HANDLER.remoteInstance()` to get the local and remote config instances in a server.\n\n### Config mismatch detect\n\nYou can use `@OptionFlags` to define option flags for an autogen config\n\nIt's same as using `Option.Builder.flag(...OptionFlag flag)` in YACL\n\n```java\npublic class CommonConfig {\n    @AutoGen(category = \"test\", group = \"test\")\n    @SerialEntry(comment = \"This option requires game restart\")\n    @OptionFlags({OptionFlags.FlagType.GAME_RESTART})\n    @BooleanFlag\n    public boolean myOption = true;\n}\n```\n\nBut by using `@OptionFlags`, YACL Synced will detect the config mismatch when joining a server and show a warning screen.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigercrl%2Fyaclsynced","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftigercrl%2Fyaclsynced","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigercrl%2Fyaclsynced/lists"}