mirror of
https://github.com/TeamMidnightDust/MidnightLib.git
synced 2025-12-17 09:45:10 +01:00
MidnightLib 0.4.4 - Some more fixes
This commit is contained in:
@@ -2,15 +2,13 @@ package eu.midnightdust.lib.config;
|
||||
|
||||
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
|
||||
import com.terraformersmc.modmenu.api.ModMenuApi;
|
||||
import eu.midnightdust.core.MidnightLibClient;
|
||||
import eu.midnightdust.core.config.MidnightLibConfig;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class AutoModMenu implements ModMenuApi {
|
||||
private static List<String> hiddenMods = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public ConfigScreenFactory<?> getModConfigScreenFactory() {
|
||||
@@ -21,13 +19,10 @@ public class AutoModMenu implements ModMenuApi {
|
||||
public Map<String, ConfigScreenFactory<?>> getProvidedConfigScreenFactories() {
|
||||
HashMap<String, ConfigScreenFactory<?>> map = new HashMap<>();
|
||||
MidnightConfig.configClass.forEach((modid, cClass) -> {
|
||||
if (!hiddenMods.contains(modid))
|
||||
if (!MidnightLibClient.hiddenMods.contains(modid))
|
||||
map.put(modid, parent -> MidnightConfig.getScreen(parent, modid));
|
||||
}
|
||||
);
|
||||
return map;
|
||||
}
|
||||
public static void hideFromModMenu(String hiddenMod) {
|
||||
hiddenMods.add(hiddenMod);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user