Search in sources :

Example 1 with EventHandlerGC

use of micdoodle8.mods.galacticraft.core.event.EventHandlerGC in project Galacticraft by micdoodle8.

the class GalacticraftCore method preInit.

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
    GCCapabilities.register();
    this.initModInfo(event.getModMetadata());
    isPlanetsLoaded = Loader.isModLoaded(Constants.MOD_ID_PLANETS);
    GCCoreUtil.nextID = 0;
    if (CompatibilityManager.isSmartMovingLoaded || CompatibilityManager.isWitcheryLoaded) {
        isHeightConflictingModInstalled = true;
    }
    MinecraftForge.EVENT_BUS.register(new EventHandlerGC());
    handler = new GCPlayerHandler();
    MinecraftForge.EVENT_BUS.register(handler);
    GalacticraftCore.proxy.preInit(event);
    ConnectionPacket.bus = NetworkRegistry.INSTANCE.newEventDrivenChannel(ConnectionPacket.CHANNEL);
    ConnectionPacket.bus.register(new ConnectionPacket());
    ConfigManagerCore.initialize(new File(event.getModConfigurationDirectory(), Constants.CONFIG_FILE));
    EnergyConfigHandler.setDefaultValues(new File(event.getModConfigurationDirectory(), Constants.POWER_CONFIG_FILE));
    ChunkLoadingCallback.loadConfig(new File(event.getModConfigurationDirectory(), Constants.CHUNKLOADER_CONFIG_FILE));
    GalacticraftCore.galacticraftBlocksTab = new CreativeTabGC(CreativeTabs.getNextID(), "galacticraft_blocks", null, 0, null);
    GalacticraftCore.galacticraftItemsTab = new CreativeTabGC(CreativeTabs.getNextID(), "galacticraft_items", null, 0, null);
    GCFluids.registerOilandFuel();
    if (CompatibilityManager.PlayerAPILoaded) {
        ServerPlayerAPI.register(Constants.MOD_ID_CORE, GCPlayerBaseMP.class);
    }
    GCBlocks.initBlocks();
    GCItems.initItems();
    proxy.registerVariants();
    GCFluids.registerFluids();
    // Force initialisation of GC biome types in preinit (after config load) - this helps BiomeTweaker by initialising mod biomes in a fixed order during mod loading
    BiomeGenBase biomeOrbitPreInit = BiomeGenBaseOrbit.space;
    BiomeGenBase biomeMoonPreInit = BiomeGenBaseMoon.moonFlat;
}
Also used : ConnectionPacket(micdoodle8.mods.galacticraft.core.network.ConnectionPacket) GCPlayerHandler(micdoodle8.mods.galacticraft.core.entities.player.GCPlayerHandler) BiomeGenBase(net.minecraft.world.biome.BiomeGenBase) File(java.io.File) EventHandlerGC(micdoodle8.mods.galacticraft.core.event.EventHandlerGC) EventHandler(net.minecraftforge.fml.common.Mod.EventHandler)

Aggregations

File (java.io.File)1 GCPlayerHandler (micdoodle8.mods.galacticraft.core.entities.player.GCPlayerHandler)1 EventHandlerGC (micdoodle8.mods.galacticraft.core.event.EventHandlerGC)1 ConnectionPacket (micdoodle8.mods.galacticraft.core.network.ConnectionPacket)1 BiomeGenBase (net.minecraft.world.biome.BiomeGenBase)1 EventHandler (net.minecraftforge.fml.common.Mod.EventHandler)1