diff --git a/forge/src/testMod/java/dev/engine_room/flywheel/FlywheelTestModClient.java b/forge/src/testMod/java/dev/engine_room/flywheel/FlywheelTestModClient.java index f04eb604f..3a2002661 100644 --- a/forge/src/testMod/java/dev/engine_room/flywheel/FlywheelTestModClient.java +++ b/forge/src/testMod/java/dev/engine_room/flywheel/FlywheelTestModClient.java @@ -1,14 +1,14 @@ package dev.engine_room.flywheel; +import net.neoforged.fml.common.Mod; +import net.neoforged.fml.loading.FMLLoader; +import net.neoforged.neoforge.client.event.ClientTickEvent; +import net.neoforged.neoforge.common.NeoForge; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.spongepowered.asm.mixin.MixinEnvironment; import net.minecraft.client.Minecraft; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.TickEvent; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.loading.FMLLoader; @Mod("flywheel_testmod") public class FlywheelTestModClient { @@ -18,16 +18,14 @@ public class FlywheelTestModClient { public FlywheelTestModClient() { LOGGER.info("Starting {} on Dist: {}", NAME, FMLLoader.getDist()); - MinecraftForge.EVENT_BUS.addListener((TickEvent.ClientTickEvent e) -> { - if (e.phase == TickEvent.Phase.END) { - LOGGER.info("Running mixin audit"); - MixinEnvironment.getCurrentEnvironment() - .audit(); + NeoForge.EVENT_BUS.addListener((ClientTickEvent.Post e) -> { + LOGGER.info("Running mixin audit"); + MixinEnvironment.getCurrentEnvironment() + .audit(); - LOGGER.info("Stopping client"); - Minecraft.getInstance() - .stop(); - } + LOGGER.info("Stopping client"); + Minecraft.getInstance() + .stop(); }); } }