diff options
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/thedarkcolour/kotlinforforge/KotlinModLoadingContext.kt | 12 | ||||
-rw-r--r-- | src/main/kotlin/thedarkcolour/kotlinforforge/forge/Forge.kt | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/main/kotlin/thedarkcolour/kotlinforforge/KotlinModLoadingContext.kt b/src/main/kotlin/thedarkcolour/kotlinforforge/KotlinModLoadingContext.kt index 44aac2d..78aaef7 100644 --- a/src/main/kotlin/thedarkcolour/kotlinforforge/KotlinModLoadingContext.kt +++ b/src/main/kotlin/thedarkcolour/kotlinforforge/KotlinModLoadingContext.kt @@ -1,5 +1,6 @@ package thedarkcolour.kotlinforforge +import net.minecraftforge.eventbus.api.IEventBus import thedarkcolour.kotlinforforge.eventbus.KotlinEventBus import thedarkcolour.kotlinforforge.forge.LOADING_CONTEXT @@ -10,7 +11,16 @@ class KotlinModLoadingContext constructor(private val container: KotlinModContai /** * @see thedarkcolour.kotlinforforge.forge.MOD_BUS */ - fun getEventBus(): KotlinEventBus { + fun getKEventBus(): KotlinEventBus { + return container.eventBus + } + + /** @since 1.2.1 + * @see thedarkcolour.kotlinforforge.forge.MOD_BUS + * + * Required to make mods that use an older version of KFF work. + */ + fun getEventBus(): IEventBus { return container.eventBus } diff --git a/src/main/kotlin/thedarkcolour/kotlinforforge/forge/Forge.kt b/src/main/kotlin/thedarkcolour/kotlinforforge/forge/Forge.kt index e0b9cd8..fe8ee42 100644 --- a/src/main/kotlin/thedarkcolour/kotlinforforge/forge/Forge.kt +++ b/src/main/kotlin/thedarkcolour/kotlinforforge/forge/Forge.kt @@ -40,7 +40,7 @@ val FORGE_BUS = KotlinEventBusWrapper(MinecraftForge.EVENT_BUS as EventBus) * @see net.minecraftforge.event.RegistryEvent */ val MOD_BUS: KotlinEventBus - inline get() = KotlinModLoadingContext.get().getEventBus() + inline get() = KotlinModLoadingContext.get().getKEventBus() /** @since 1.0.0 * Mod context for Kotlin mods. |