Update test mod for neoforge

This commit is contained in:
IThundxr 2024-11-13 10:11:30 -05:00
parent 0d2971007b
commit e35955873b
No known key found for this signature in database

View file

@ -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,8 +18,7 @@ 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) {
NeoForge.EVENT_BUS.addListener((ClientTickEvent.Post e) -> {
LOGGER.info("Running mixin audit");
MixinEnvironment.getCurrentEnvironment()
.audit();
@ -27,7 +26,6 @@ public class FlywheelTestModClient {
LOGGER.info("Stopping client");
Minecraft.getInstance()
.stop();
}
});
}
}