debugging
This commit is contained in:
parent
516baf4d29
commit
ea798c9cd7
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user