Fix search tree config value

This commit is contained in:
embeddedt 2023-05-01 10:41:34 -04:00
parent 6e134ab290
commit 7221893e30
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -129,7 +129,8 @@ public class ModernFixEarlyConfig {
private static final boolean isDevEnv = !FMLLoader.isProduction() && FMLLoader.getLoadingModList().getModFileById("modernfix").getFile().getLocator() instanceof ExplodedDirectoryLocator;;
static {
shouldReplaceSearchTrees = modPresent("jei");
Optional<ModInfo> jeiMod = FMLLoader.getLoadingModList().getMods().stream().filter(mod -> mod.getModId().equals("jei")).findFirst();
shouldReplaceSearchTrees = (jeiMod.isPresent() && jeiMod.get().getVersion().getMajorVersion() >= 10) || FMLLoader.getLoadingModList().getModFileById("roughlyenoughitems") != null;
}
private static final ImmutableMap<String, Boolean> DEFAULT_SETTING_OVERRIDES = ImmutableMap.<String, Boolean>builder()