diff --git a/platform-common/src/main/java/band/kessoku/lib/platform/api/ModLoader.java b/platform-common/src/main/java/band/kessoku/lib/platform/api/ModLoader.java index e70e6dc5..2b772c5b 100644 --- a/platform-common/src/main/java/band/kessoku/lib/platform/api/ModLoader.java +++ b/platform-common/src/main/java/band/kessoku/lib/platform/api/ModLoader.java @@ -20,4 +20,5 @@ static ModLoader getInstance() { boolean isModLoaded(String id); Collection getModIds(); Collection getMods(); + boolean isDevEnv(); } diff --git a/platform-fabric/src/main/java/band/kessoku/lib/platform/impl/ModLoaderImpl.java b/platform-fabric/src/main/java/band/kessoku/lib/platform/impl/ModLoaderImpl.java index 2488e718..5f5f18e6 100644 --- a/platform-fabric/src/main/java/band/kessoku/lib/platform/impl/ModLoaderImpl.java +++ b/platform-fabric/src/main/java/band/kessoku/lib/platform/impl/ModLoaderImpl.java @@ -68,4 +68,9 @@ public Collection getModIds() { public Collection getMods() { return FabricLoader.getInstance().getAllMods().stream().map(ModDataImpl::new).toList(); } + + @Override + public boolean isDevEnv() { + return FabricLoader.getInstance().isDevelopmentEnvironment(); + } } diff --git a/platform-neo/src/main/java/band/kessoku/lib/platform/impl/ModLoaderImpl.java b/platform-neo/src/main/java/band/kessoku/lib/platform/impl/ModLoaderImpl.java index 8dc7c362..cd5f6cb1 100644 --- a/platform-neo/src/main/java/band/kessoku/lib/platform/impl/ModLoaderImpl.java +++ b/platform-neo/src/main/java/band/kessoku/lib/platform/impl/ModLoaderImpl.java @@ -68,4 +68,9 @@ public Collection getModIds() { public Collection getMods() { return ModList.get().getMods().stream().map(ModDataImpl::new).toList(); } + + @Override + public boolean isDevEnv() { + return !FMLLoader.isProduction(); + } }