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; 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.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.spongepowered.asm.mixin.MixinEnvironment; import org.spongepowered.asm.mixin.MixinEnvironment;
import net.minecraft.client.Minecraft; 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") @Mod("flywheel_testmod")
public class FlywheelTestModClient { public class FlywheelTestModClient {
@ -18,8 +18,7 @@ public class FlywheelTestModClient {
public FlywheelTestModClient() { public FlywheelTestModClient() {
LOGGER.info("Starting {} on Dist: {}", NAME, FMLLoader.getDist()); LOGGER.info("Starting {} on Dist: {}", NAME, FMLLoader.getDist());
MinecraftForge.EVENT_BUS.addListener((TickEvent.ClientTickEvent e) -> { NeoForge.EVENT_BUS.addListener((ClientTickEvent.Post e) -> {
if (e.phase == TickEvent.Phase.END) {
LOGGER.info("Running mixin audit"); LOGGER.info("Running mixin audit");
MixinEnvironment.getCurrentEnvironment() MixinEnvironment.getCurrentEnvironment()
.audit(); .audit();
@ -27,7 +26,6 @@ public class FlywheelTestModClient {
LOGGER.info("Stopping client"); LOGGER.info("Stopping client");
Minecraft.getInstance() Minecraft.getInstance()
.stop(); .stop();
}
}); });
} }
} }