Base functions and first module #1

Merged
c0de merged 18 commits from initial-functions into main 2023-03-22 23:20:13 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit fea4169b57 - Show all commits

View File

@ -31,18 +31,18 @@ public abstract class Module {
} }
public KeyBinding getKey() { public KeyBinding getKey() {
return key; return this.key;
} }
public void toggleKey() { public void toggleKey() {
if (key != null) { if (this.key != null) {
if (key.wasPressed()) { if (this.key.wasPressed()) {
this.setState(!this.isState()); this.setState(!this.isState());
} }
} }
} }
public boolean isState() { public boolean isState() {
return state; return this.state;
} }
} }

View File

@ -19,11 +19,11 @@ public class Fullbright extends Module {
this.toggleKey(); this.toggleKey();
if (this.isState()) { if (this.isState()) {
update(client, c0deFoxMod.config.getConfig().FULLBRIGHT_GAMMA); this.update(client, c0deFoxMod.config.getConfig().FULLBRIGHT_GAMMA);
return; return;
} }
update(client, DEFAULT); this.update(client, DEFAULT);
} }
private void update(MinecraftClient client, double value) { private void update(MinecraftClient client, double value) {