Base functions and first module #1
@ -34,6 +34,14 @@ public abstract class Module {
|
|||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void toggleKey() {
|
||||||
|
if (key != null) {
|
||||||
|
if (key.wasPressed()) {
|
||||||
|
this.setState(!this.isState());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isState() {
|
public boolean isState() {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
@ -17,9 +17,7 @@ public class Fullbright extends Module {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTick(MinecraftClient client) {
|
public void onTick(MinecraftClient client) {
|
||||||
if (key.wasPressed()) {
|
this.toggleKey();
|
||||||
this.setState(!this.isState());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.isState()) {
|
if (this.isState()) {
|
||||||
c0deFoxModClient.LOGGER.warn("Active State");
|
c0deFoxModClient.LOGGER.warn("Active State");
|
||||||
|
Loading…
Reference in New Issue
Block a user