Skip to content

Commit

Permalink
chore: provide fabric impls of mcUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
Sychic committed May 10, 2024
1 parent 14ac75b commit 1846d9e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mod/src/main/kotlin/gg/skytils/skytilsmod/utils/mcUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@

package gg.skytils.skytilsmod.utils

//#if FORGE
import net.minecraft.launchwrapper.Launch
import net.minecraftforge.fml.common.Loader
//#endif

//#if FABRIC
//$$ import net.fabricmc.loader.api.FabricLoader
//#endif

val isDeobfuscatedEnvironment by lazy {
//#if FORGE
Expand All @@ -28,6 +34,7 @@ val isDeobfuscatedEnvironment by lazy {
//#else
//$$ (System.getenv("target") ?: "").lowercase() == "fmluserdevclient"
//#endif
//$$ FabricLoader.getInstance().isDevelopmentEnvironment
//#endif
}

Expand All @@ -38,4 +45,5 @@ fun isModLoaded(id: String) =
//#else
//$$ FMLLoader.getLoadingModList().getModFileById(id)
//#endif
//$$ FabricLoader.getInstance().isModLoaded(id)
//#endif

0 comments on commit 1846d9e

Please sign in to comment.