aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
authorthedarkcolour <30441001+thedarkcolour@users.noreply.github.com>2020-04-18 12:13:11 -0700
committerthedarkcolour <30441001+thedarkcolour@users.noreply.github.com>2020-04-18 12:13:11 -0700
commita7dadf620caffabc53ae412ab54e039341ea10b1 (patch)
tree40c1ec865c86fdd5be296c1b5dd1f95307a1a578 /src/main/kotlin
parent933694cd12e4a443e7801696b69dd71d3298c1fb (diff)
downloadKotlinForForge-a7dadf620caffabc53ae412ab54e039341ea10b1.tar.gz
KotlinForForge-a7dadf620caffabc53ae412ab54e039341ea10b1.tar.bz2
KotlinForForge-a7dadf620caffabc53ae412ab54e039341ea10b1.zip
Update 1.2.1
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/thedarkcolour/kotlinforforge/KotlinModLoadingContext.kt12
-rw-r--r--src/main/kotlin/thedarkcolour/kotlinforforge/forge/Forge.kt2
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.