Skip to content

Commit

Permalink
add debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Oct 23, 2024
1 parent 61847a7 commit d917a87
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ public class FlywheelTestModClient {
private int ticks = 0;

public FlywheelTestModClient() {
log("Loading test mod")

if (Boolean.getBoolean("flywheel.autoTest")) {
log("running autotest")

IEventBus modEventBus = FMLJavaModLoadingContext.get()
.getModEventBus();

modEventBus.addListener((TickEvent.ClientTickEvent e) -> {
if (e.phase == TickEvent.Phase.END) {
log("current ticks" + ticks)
if (++ticks == 50) {
MixinEnvironment.getCurrentEnvironment().audit();
Minecraft.getInstance().stop();
Expand All @@ -27,4 +32,8 @@ public FlywheelTestModClient() {
});
}
}

public static void log(String s) {
System.out.println("[Flywheel Test Mod] " + s)
}
}

0 comments on commit d917a87

Please sign in to comment.