2021-05-20 01:35:37 +02:00
|
|
|
package com.jozufozu.flywheel;
|
|
|
|
|
2021-06-30 21:43:54 +02:00
|
|
|
import com.jozufozu.flywheel.config.FlwCommands;
|
|
|
|
import com.jozufozu.flywheel.config.FlwConfig;
|
2021-06-19 07:52:33 +02:00
|
|
|
import com.jozufozu.flywheel.config.FlwPackets;
|
|
|
|
|
2021-09-05 01:40:40 +02:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
2021-06-19 07:52:33 +02:00
|
|
|
import net.minecraftforge.api.distmarker.Dist;
|
2021-06-16 20:19:33 +02:00
|
|
|
import net.minecraftforge.common.MinecraftForge;
|
2021-06-19 07:52:33 +02:00
|
|
|
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")
|
2021-05-20 01:35:37 +02:00
|
|
|
public class Flywheel {
|
|
|
|
|
2021-06-30 21:43:54 +02:00
|
|
|
public static final String ID = "flywheel";
|
2021-06-16 20:19:33 +02:00
|
|
|
|
2021-06-30 21:43:54 +02:00
|
|
|
public Flywheel() {
|
|
|
|
FMLJavaModLoadingContext.get()
|
|
|
|
.getModEventBus()
|
|
|
|
.addListener(this::setup);
|
2021-06-16 20:19:33 +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 20:19:33 +02:00
|
|
|
|
2021-06-30 21:43:54 +02:00
|
|
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> FlywheelClient::clientInit);
|
2021-06-19 07:52:33 +02:00
|
|
|
}
|
2021-06-16 20:19:33 +02:00
|
|
|
|
2021-09-05 01:40:40 +02:00
|
|
|
public static ResourceLocation rl(String path) {
|
|
|
|
return new ResourceLocation(ID, path);
|
|
|
|
}
|
|
|
|
|
|
|
|
private void setup(final FMLCommonSetupEvent event) {
|
2021-06-19 07:52:33 +02:00
|
|
|
FlwPackets.registerPackets();
|
|
|
|
}
|
2021-05-20 01:35:37 +02:00
|
|
|
}
|