From fb1184288c3fc6a74afc65ad50c1c55ab88b7800 Mon Sep 17 00:00:00 2001 From: autaut03 Date: Tue, 12 Feb 2019 23:58:28 +0200 Subject: [PATCH] Updated docs --- README.md | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6027870..52e083a 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,38 @@ # Forgelin Fork of [Emberwalker's Forgelin](https://github.com/Emberwalker/Forgelin). +All versions can be found [here](http://maven.shadowfacts.net/net/shadowfacts/Forgelin/). + ## Additions - Shades the Kotlin standard library, runtime, and reflect libraries so you don't have to. -- Provides a Forge `ILanguageAdapter` for using Kotlin `object` classes as your main mod class. +- Provides a Forge `IModLanguageProvider` for using Kotlin `object` classes as your main mod class and adds support for +`object` instances for `@Mod.EventBusSubscriber` ## Usage +Set up your default Kotlin dev environment (IDEA can help you with that), then in your `build.gradle`: ```groovy repositories { jcenter() - maven { - url "http://maven.shadowfacts.net/" - } + maven { url 'https://maven.shadowfacts.net' } } dependencies { - compile group: "net.shadowfacts", name: "Forgelin", version: "LATEST_VERSION" + compile group: 'net.shadowfacts', name: 'Forgelin', version: 'LATEST_VERSION' } ``` - -All versions can be seen [here](http://maven.shadowfacts.net/net/shadowfacts/Forgelin/). - **Note:** You must have the `jcenter()` call in your `repositories` block. JCenter is used to host the Kotlin coroutines libraries. + +Then in your `mods.toml`: +```toml +modLoader="kotlinfml" + +[[dependencies.your_mod_name]] + modId="forgelin" + mandatory=true + ordering="NONE" + side="BOTH" + # optionally, specify version range for Forgelin +``` + +Finally, replace `FMLModLoadingContext` references in your code with `FMLKotlinModLoadingContext`. For more info, check +out test sources [here](https://github.com/shadowfacts/Forgelin/tree/master/src/test/kotlin/net/shadowfacts/forgelin).