Flywheel/src/main/java/com/jozufozu/flywheel/Flywheel.java

40 lines
1.1 KiB
Java
Raw Normal View History

package com.jozufozu.flywheel;
import com.jozufozu.flywheel.config.FlwCommands;
import com.jozufozu.flywheel.config.FlwConfig;
import com.jozufozu.flywheel.config.FlwPackets;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
2021-06-16 20:19:33 +02:00
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.DistExecutor;
2021-06-16 20:19:33 +02:00
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
@Mod("flywheel")
public class Flywheel {
public static final String ID = "flywheel";
2021-06-16 20:19:33 +02:00
public Flywheel() {
FMLJavaModLoadingContext.get()
.getModEventBus()
.addListener(this::setup);
2021-06-16 20:19:33 +02:00
MinecraftForge.EVENT_BUS.addListener(FlwCommands::onServerStarting);
2021-06-16 22:03:40 +02:00
FlwConfig.init();
2021-06-16 20:19:33 +02:00
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> FlywheelClient::clientInit);
}
2021-06-16 20:19:33 +02:00
public static ResourceLocation rl(String path) {
return new ResourceLocation(ID, path);
}
private void setup(final FMLCommonSetupEvent event) {
FlwPackets.registerPackets();
}
}