mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-12 21:43:56 +01:00
Clever commit title
- Change the Fabric mod ID to match Forge - Move "Flywheel Test Mod" to static - Cleanup start/stop messages - Use the client start event on Fabric
This commit is contained in:
parent
84e27867d3
commit
d3c64df7be
@ -5,22 +5,24 @@ import org.slf4j.LoggerFactory;
|
||||
import org.spongepowered.asm.mixin.MixinEnvironment;
|
||||
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
|
||||
public class FlywheelTestModClient implements ClientModInitializer {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger("Flywheel Test Mod");
|
||||
public static final String NAME = "Flywheel Test Mod";
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(NAME);
|
||||
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
LOGGER.info("Starting Test Mod, on Env: {}", FabricLoader.getInstance().getEnvironmentType());
|
||||
LOGGER.info("Starting {} on EnvType: {}", NAME, FabricLoader.getInstance()
|
||||
.getEnvironmentType());
|
||||
|
||||
ClientTickEvents.END_CLIENT_TICK.register(client -> {
|
||||
ClientLifecycleEvents.CLIENT_STARTED.register(client -> {
|
||||
LOGGER.info("Running mixin audit");
|
||||
MixinEnvironment.getCurrentEnvironment()
|
||||
.audit();
|
||||
|
||||
LOGGER.info("Ran mixin audit, stopping client.");
|
||||
LOGGER.info("Stopping client");
|
||||
client.stop();
|
||||
});
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "${mod_id}-testmod",
|
||||
"id" : "${mod_id}_testmod",
|
||||
"name": "${mod_name} Test Mod",
|
||||
"version": "1.0.0",
|
||||
"environment": "*",
|
||||
|
@ -12,10 +12,11 @@ import net.minecraftforge.fml.loading.FMLLoader;
|
||||
|
||||
@Mod("flywheel_testmod")
|
||||
public class FlywheelTestModClient {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger("Flywheel Test Mod");
|
||||
public static final String NAME = "Flywheel Test Mod";
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(NAME);
|
||||
|
||||
public FlywheelTestModClient() {
|
||||
LOGGER.info("Starting Test Mod, on Dist: {}", FMLLoader.getDist());
|
||||
LOGGER.info("Starting {} on Dist: {}", NAME, FMLLoader.getDist());
|
||||
|
||||
MinecraftForge.EVENT_BUS.addListener((TickEvent.ClientTickEvent e) -> {
|
||||
if (e.phase == TickEvent.Phase.END) {
|
||||
@ -23,7 +24,7 @@ public class FlywheelTestModClient {
|
||||
MixinEnvironment.getCurrentEnvironment()
|
||||
.audit();
|
||||
|
||||
LOGGER.info("Ran mixin audit, stopping client.");
|
||||
LOGGER.info("Stopping client");
|
||||
Minecraft.getInstance()
|
||||
.stop();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user