Base functions and first module #1
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user