From 372eec27e5e0c8ef796ed9e6bcdc68a10df84718 Mon Sep 17 00:00:00 2001 From: nea Date: Tue, 12 Jul 2022 14:20:22 +0200 Subject: initial --- .../net/examplemod/fabric/ExampleExpectPlatformImpl.kt | 13 +++++++++++++ .../main/kotlin/net/examplemod/fabric/ExampleModFabric.kt | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 fabric/src/main/kotlin/net/examplemod/fabric/ExampleExpectPlatformImpl.kt create mode 100644 fabric/src/main/kotlin/net/examplemod/fabric/ExampleModFabric.kt (limited to 'fabric/src/main/kotlin') diff --git a/fabric/src/main/kotlin/net/examplemod/fabric/ExampleExpectPlatformImpl.kt b/fabric/src/main/kotlin/net/examplemod/fabric/ExampleExpectPlatformImpl.kt new file mode 100644 index 0000000..8982dfc --- /dev/null +++ b/fabric/src/main/kotlin/net/examplemod/fabric/ExampleExpectPlatformImpl.kt @@ -0,0 +1,13 @@ +package net.examplemod.fabric + +import net.fabricmc.loader.api.FabricLoader +import java.nio.file.Path +import net.examplemod.ExampleExpectPlatform + +object ExampleExpectPlatformImpl { + /** + * This is our actual method to [ExampleExpectPlatform.getConfigDirectory]. + */ + @JvmStatic + fun getConfigDirectory(): Path = FabricLoader.getInstance().configDir +} \ No newline at end of file diff --git a/fabric/src/main/kotlin/net/examplemod/fabric/ExampleModFabric.kt b/fabric/src/main/kotlin/net/examplemod/fabric/ExampleModFabric.kt new file mode 100644 index 0000000..c11491c --- /dev/null +++ b/fabric/src/main/kotlin/net/examplemod/fabric/ExampleModFabric.kt @@ -0,0 +1,10 @@ +package net.examplemod.fabric + +import net.examplemod.ExampleMod.init +import net.fabricmc.api.ModInitializer + +class ExampleModFabric : ModInitializer { + override fun onInitialize() { + init() + } +} \ No newline at end of file -- cgit