{"id":15016088,"url":"https://github.com/thedarkcolour/kotlinforforge","last_synced_at":"2025-04-04T07:04:29.798Z","repository":{"id":40621071,"uuid":"219357264","full_name":"thedarkcolour/KotlinForForge","owner":"thedarkcolour","description":"Makes Kotlin forge-friendly.","archived":false,"fork":false,"pushed_at":"2024-12-09T21:55:59.000Z","size":114256,"stargazers_count":196,"open_issues_count":9,"forks_count":28,"subscribers_count":3,"default_branch":"5.x","last_synced_at":"2025-04-04T07:04:24.536Z","etag":null,"topics":["kotlin","minecraft-api","minecraft-forge"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thedarkcolour.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"thedarkcolour","patreon":"thedarkcolour","ko_fi":"thedarkcolour"}},"created_at":"2019-11-03T19:56:42.000Z","updated_at":"2025-03-22T03:09:21.000Z","dependencies_parsed_at":"2023-12-26T04:26:16.577Z","dependency_job_id":"4d2a8c07-d38f-44ae-b8ae-0dd9097fd5a1","html_url":"https://github.com/thedarkcolour/KotlinForForge","commit_stats":{"total_commits":197,"total_committers":8,"mean_commits":24.625,"dds":"0.14213197969543145","last_synced_commit":"5c873299de6328603e4abba5defc16c0c32067bc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedarkcolour%2FKotlinForForge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedarkcolour%2FKotlinForForge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedarkcolour%2FKotlinForForge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedarkcolour%2FKotlinForForge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thedarkcolour","download_url":"https://codeload.github.com/thedarkcolour/KotlinForForge/tar.gz/refs/heads/5.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135141,"owners_count":20889420,"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","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":["kotlin","minecraft-api","minecraft-forge"],"created_at":"2024-09-24T19:48:23.468Z","updated_at":"2025-04-04T07:04:29.765Z","avatar_url":"https://github.com/thedarkcolour.png","language":"Kotlin","funding_links":["https://github.com/sponsors/thedarkcolour","https://patreon.com/thedarkcolour","https://ko-fi.com/thedarkcolour"],"categories":[],"sub_categories":[],"readme":"# KotlinForForge\n**Instructions for other versions: [1.19.3-1.20.4](https://github.com/thedarkcolour/KotlinForForge/blob/4.x/README.md) | [1.19.2](https://github.com/thedarkcolour/KotlinForForge/blob/3.x/README.md) | [1.14-1.16.5](https://github.com/thedarkcolour/KotlinForForge/blob/1.x/README.md) | [1.17-1.17.1](https://github.com/thedarkcolour/KotlinForForge/blob/2.x/README.md)**\n\nMakes Kotlin Forge-friendly by doing the following:\n- Provides Kotlin stdlib, reflection, JSON serialization, and coroutines libraries.\n- Provides `KotlinLanguageLoader` to allow usage of object declarations as @Mod targets.\n- Provides `AutoKotlinEventBusSubscriber` to allow usage of object declarations as @EventBusSubscriber targets.\n- Provides useful utility functions and constants\n\n[MIGRATION GUIDE](https://gist.github.com/thedarkcolour/5590f46b0d4d8ca692add2934d05e642)\n\nA 1.21 Forge example mod is provided here: [1.21 KotlinModdingSkeleton Forge repository](https://github.com/thedarkcolour/KotlinModdingSkeleton/tree/1.21-forge)\nA 1.21 NeoForge example mod is provided here: [1.21 KotlinModdingSkeleton NeoForge repository](https://github.com/thedarkcolour/KotlinModdingSkeleton/tree/1.21-neoforge)\n\nIf you aren't sure where to start, make a fork of the KotlinModdingSkeleton repository (replace BRANCH with your version)\n```git\ngit clone --branch BRANCH https://github.com/thedarkcolour/KotlinModdingSkeleton.git\n```\n\nTo implement in an existing project, merge the following into your build script:\n\u003cdetails\u003e\n        \u003csummary\u003e\u003cb\u003eGradle\u003c/b\u003e\u003c/summary\u003e\n\n```groovy\nplugins {    \n    // Adds the Kotlin Gradle plugin\n    id 'org.jetbrains.kotlin.jvm' version '2.0.21'\n    // OPTIONAL Kotlin Serialization plugin\n    //id 'org.jetbrains.kotlin.plugin.serialization' version '2.0.0'\n}\n\nrepositories {\n    // Add KFF Maven repository\n    maven {\n        name = 'Kotlin for Forge'\n        url = 'https://thedarkcolour.github.io/KotlinForForge/'\n    }\n}\n\ndependencies {\n    // Adds KFF as dependency and Kotlin libs (use the variant matching your mod loader)\n    // FORGE (1.21+ ONLY)\n    implementation 'thedarkcolour:kfflang:5.6.0'\n    implementation 'thedarkcolour:kfflib:5.6.0'\n    implementation 'thedarkcolour:kffmod:5.6.0'\n    // NEOFORGE\n    implementation 'thedarkcolour:kotlinforforge-neoforge:5.6.0'\n}\n// ONLY ON REGULAR FORGE\nsourceSets.each {\n\tdef dir = layout.buildDirectory.dir(\"sourcesSets/$it.name\")\n\tit.output.resourcesDir = dir\n\tit.java.destinationDirectory = dir\n\tit.kotlin.destinationDirectory = dir\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n        \u003csummary\u003e\u003cb\u003eGradle (Kotlin)\u003c/b\u003e\u003c/summary\u003e\n\n```kotlin\nplugins {\n    // Adds the Kotlin Gradle plugin\n    kotlin(\"jvm\") version \"2.0.21\"\n    // OPTIONAL Kotlin Serialization plugin\n    //kotlin(\"plugin.serialization\") version \"2.0.0\"\n}\n\nrepositories {\n    // Add KFF Maven repository\n    maven {\n        name = \"Kotlin for Forge\"\n        setUrl(\"https://thedarkcolour.github.io/KotlinForForge/\")\n    }\n}\n\ndependencies {\n    // Adds KFF as dependency and Kotlin libs (use the variant matching your mod loader)\n    // FORGE (1.21+ ONLY)\n    implementation(\"thedarkcolour:kfflang:5.6.0\")\n    implementation(\"thedarkcolour:kfflib:5.6.0\")\n    implementation(\"thedarkcolour:kffmod:5.6.0\")\n    // NEOFORGE\n    implementation(\"thedarkcolour:kotlinforforge-neoforge:5.6.0\")\n}\n// ONLY ON REGULAR FORGE\nsourceSets.configureEach {\n    val dir = layout.buildDirectory.dir(\"sourcesSets/$name\")\n    output.setResourcesDir(dir)\n    java.destinationDirectory.set(dir)\n    kotlin.destinationDirectory.set(dir)\n}\n```\n\u003c/details\u003e\n\nThen, change the following to your neoforge.mods.toml file:\n```toml\nmodLoader=\"kotlinforforge\"\n# Change this if you require a certain version of KotlinForForge\nloaderVersion=\"[5.6,)\"\n```\n\nUse `thedarkcolour.kotlinforforge.forge.MOD_BUS` instead of        \ninstead of `net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedarkcolour%2Fkotlinforforge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthedarkcolour%2Fkotlinforforge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedarkcolour%2Fkotlinforforge/lists"}