Skip to content

Commit

Permalink
add isDevEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Aug 5, 2024
1 parent c14f18e commit 5e3a301
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ static ModLoader getInstance() {
boolean isModLoaded(String id);
Collection<String> getModIds();
Collection<? extends ModData> getMods();
boolean isDevEnv();
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,9 @@ public Collection<String> getModIds() {
public Collection<? extends ModData> getMods() {
return FabricLoader.getInstance().getAllMods().stream().map(ModDataImpl::new).toList();
}

@Override
public boolean isDevEnv() {
return FabricLoader.getInstance().isDevelopmentEnvironment();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,9 @@ public Collection<String> getModIds() {
public Collection<? extends ModData> getMods() {
return ModList.get().getMods().stream().map(ModDataImpl::new).toList();
}

@Override
public boolean isDevEnv() {
return !FMLLoader.isProduction();
}
}

0 comments on commit 5e3a301

Please sign in to comment.