Updated docs

This commit is contained in:
autaut03 2019-02-12 23:58:28 +02:00
parent 1ab90f9cc3
commit fb1184288c
1 changed files with 22 additions and 8 deletions

View File

@ -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).