Forgelin/src/main/kotlin/net/shadowfacts/forgelin/FMLKotlinModLoadingContext.kt

15 lines
398 B
Kotlin
Raw Normal View History

2019-02-12 19:20:49 +00:00
package net.shadowfacts.forgelin
import net.minecraftforge.eventbus.api.IEventBus
2019-02-14 19:11:18 +00:00
import net.minecraftforge.fml.ModLoadingContext
2019-02-12 19:20:49 +00:00
object FMLKotlinModLoadingContext {
fun get(): Context {
2019-02-14 19:11:18 +00:00
return ModLoadingContext.get().extension()
2019-02-12 19:20:49 +00:00
}
2019-02-14 19:11:18 +00:00
class Context(private val container: FMLKotlinModContainer) {
val modEventBus: IEventBus
2019-02-14 19:11:18 +00:00
get() = container.eventBus
2019-02-12 19:20:49 +00:00
}
}