From c721a44ebfe0ddcf69761973bcc67cd2f9a22e41 Mon Sep 17 00:00:00 2001 From: MachieCodes Date: Thu, 2 Jan 2025 15:43:43 -0600 Subject: [PATCH] Works Easier than I was expecting to implement this at least, not sure if this is actually possible to optimize --- .../gui/screens/ModulesScreen.java | 1 + .../meteorclient/systems/config/Config.java | 41 ++++++++++++------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/main/java/meteordevelopment/meteorclient/gui/screens/ModulesScreen.java b/src/main/java/meteordevelopment/meteorclient/gui/screens/ModulesScreen.java index ce6c19a803..fda24e61da 100644 --- a/src/main/java/meteordevelopment/meteorclient/gui/screens/ModulesScreen.java +++ b/src/main/java/meteordevelopment/meteorclient/gui/screens/ModulesScreen.java @@ -69,6 +69,7 @@ protected WWindow createCategory(WContainer c, Category category) { w.view.spacing = 0; for (Module module : Modules.get().getGroup(category)) { + if (Config.get().hiddenModules.get().contains(module)) continue; w.add(theme.module(module)).expandX(); } diff --git a/src/main/java/meteordevelopment/meteorclient/systems/config/Config.java b/src/main/java/meteordevelopment/meteorclient/systems/config/Config.java index 64c157ea9c..ff1390dcc0 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/config/Config.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/config/Config.java @@ -11,6 +11,8 @@ import meteordevelopment.meteorclient.settings.*; import meteordevelopment.meteorclient.systems.System; import meteordevelopment.meteorclient.systems.Systems; +import meteordevelopment.meteorclient.systems.modules.Module; +import meteordevelopment.meteorclient.systems.modules.combat.BedAura; import meteordevelopment.meteorclient.utils.render.color.SettingColor; import net.minecraft.nbt.NbtCompound; import net.minecraft.nbt.NbtElement; @@ -26,6 +28,7 @@ public class Config extends System { public final Settings settings = new Settings(); private final SettingGroup sgVisual = settings.createGroup("Visual"); + private final SettingGroup sgModules = settings.createGroup("Modules"); private final SettingGroup sgChat = settings.createGroup("Chat"); private final SettingGroup sgMisc = settings.createGroup("Misc"); @@ -94,6 +97,29 @@ public class Config extends System { .build() ); + // Modules + + public final Setting> hiddenModules = sgModules.add(new ModuleListSetting.Builder() + .name("hidden-modules") + .description("Prevent these modules from being rendered as options in the clickgui.") + .build() + ); + + public final Setting moduleSearchCount = sgModules.add(new IntSetting.Builder() + .name("module-search-count") + .description("Amount of modules and settings to be shown in the module search bar.") + .defaultValue(8) + .min(1).sliderMax(12) + .build() + ); + + public final Setting moduleAliases = sgModules.add(new BoolSetting.Builder() + .name("search-module-aliases") + .description("Whether or not module aliases will be used in the module search bar.") + .defaultValue(true) + .build() + ); + // Chat public final Setting prefix = sgChat.add(new StringSetting.Builder() @@ -134,21 +160,6 @@ public class Config extends System { .build() ); - public final Setting moduleSearchCount = sgMisc.add(new IntSetting.Builder() - .name("module-search-count") - .description("Amount of modules and settings to be shown in the module search bar.") - .defaultValue(8) - .min(1).sliderMax(12) - .build() - ); - - public final Setting moduleAliases = sgMisc.add(new BoolSetting.Builder() - .name("search-module-aliases") - .description("Whether or not module aliases will be used in the module search bar.") - .defaultValue(true) - .build() - ); - public List dontShowAgainPrompts = new ArrayList<>(); public Config() {