From ea798c9cd713ce064e404a06b227b53c6a29a9bc Mon Sep 17 00:00:00 2001 From: c0de Date: Mon, 20 Mar 2023 22:29:41 -0500 Subject: [PATCH] debugging --- .../java/dev/c0de/minecraft/client/KeybindManager.java | 2 ++ .../dev/c0de/minecraft/client/modules/Fullbright.java | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/dev/c0de/minecraft/client/KeybindManager.java b/src/main/java/dev/c0de/minecraft/client/KeybindManager.java index e1db807..7deb7ba 100644 --- a/src/main/java/dev/c0de/minecraft/client/KeybindManager.java +++ b/src/main/java/dev/c0de/minecraft/client/KeybindManager.java @@ -25,6 +25,8 @@ public class KeybindManager { final String name = module.getClass().getName(); final boolean newState = states.get(name); + c0deFoxModClient.LOGGER.info(name); + states.put(name, !states.getOrDefault(name, false)); module.setState(newState); diff --git a/src/main/java/dev/c0de/minecraft/client/modules/Fullbright.java b/src/main/java/dev/c0de/minecraft/client/modules/Fullbright.java index d4de1e6..8b31aeb 100644 --- a/src/main/java/dev/c0de/minecraft/client/modules/Fullbright.java +++ b/src/main/java/dev/c0de/minecraft/client/modules/Fullbright.java @@ -2,6 +2,7 @@ package dev.c0de.minecraft.client.modules; import dev.c0de.minecraft.c0deFoxMod; import dev.c0de.minecraft.client.Module; +import dev.c0de.minecraft.client.c0deFoxModClient; import dev.c0de.minecraft.client.KeybindManager; import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; @@ -26,16 +27,19 @@ public class Fullbright extends Module { @Override public void onTick(KeybindManager manager, MinecraftClient client) { - if (state) + update(client, DEFAULT); + if (this.isState()) { + c0deFoxModClient.LOGGER.warn("Active State"); update(client, c0deFoxMod.config.getConfig().FULLBRIGHT_GAMMA); - else - update(client, DEFAULT); + } } private void update(MinecraftClient client, double value) { if (client == null) return; if (client.options.getGamma().getValue() == value) return; + c0deFoxModClient.LOGGER.warn("changing gamma"); + client.options.getGamma().setValue(value); if (client.player != null) client.player.sendMessage(Text.of(String.valueOf(value)), true);