2021-06-16 21:57:52 +02:00
|
|
|
package com.jozufozu.flywheel;
|
|
|
|
|
2021-06-19 07:52:33 +02:00
|
|
|
import com.jozufozu.flywheel.config.FlwConfig;
|
|
|
|
import com.jozufozu.flywheel.config.FlwCommands;
|
|
|
|
|
|
|
|
import com.jozufozu.flywheel.config.FlwPackets;
|
|
|
|
|
|
|
|
import net.minecraftforge.api.distmarker.Dist;
|
2021-06-16 21:57:52 +02:00
|
|
|
import net.minecraftforge.common.MinecraftForge;
|
2021-06-19 07:52:33 +02:00
|
|
|
import net.minecraftforge.eventbus.api.IEventBus;
|
|
|
|
import net.minecraftforge.fml.DistExecutor;
|
2021-06-16 21:57:52 +02:00
|
|
|
import net.minecraftforge.fml.common.Mod;
|
|
|
|
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
|
|
|
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
|
|
import org.apache.logging.log4j.Logger;
|
|
|
|
|
|
|
|
@Mod("flywheel")
|
|
|
|
public class Flywheel {
|
|
|
|
|
|
|
|
public static final String ID = "flywheel";
|
|
|
|
private static final Logger LOGGER = LogManager.getLogger();
|
|
|
|
|
|
|
|
public Flywheel() {
|
2021-06-19 07:52:33 +02:00
|
|
|
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
|
2021-06-16 21:57:52 +02:00
|
|
|
|
2021-06-19 07:52:33 +02:00
|
|
|
MinecraftForge.EVENT_BUS.addListener(FlwCommands::onServerStarting);
|
2021-06-16 22:03:40 +02:00
|
|
|
|
2021-06-19 07:52:33 +02:00
|
|
|
FlwConfig.init();
|
2021-06-16 21:57:52 +02:00
|
|
|
|
2021-06-19 07:52:33 +02:00
|
|
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> Client::clientInit);
|
|
|
|
}
|
2021-06-16 21:57:52 +02:00
|
|
|
|
2021-06-19 07:52:33 +02:00
|
|
|
private void setup(final FMLCommonSetupEvent event) {
|
|
|
|
FlwPackets.registerPackets();
|
|
|
|
}
|
2021-06-16 21:57:52 +02:00
|
|
|
}
|