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 9 additions and 3 deletions
Showing only changes of commit 7821cf311e - Show all commits

View File

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

View File

@ -17,9 +17,7 @@ public class Fullbright extends Module {
@Override
public void onTick(MinecraftClient client) {
if (key.wasPressed()) {
this.setState(!this.isState());
}
this.toggleKey();
if (this.isState()) {
c0deFoxModClient.LOGGER.warn("Active State");