aether-legacy/src/main/java/com/legacy/aether/Aether.java

73 lines
2.3 KiB
Java
Raw Normal View History

2017-11-28 05:02:38 +01:00
package com.legacy.aether;
2016-12-17 16:28:16 +01:00
import com.legacy.aether.events.AetherEntityEvents;
2016-12-17 16:28:16 +01:00
import net.minecraft.util.ResourceLocation;
2017-11-28 05:02:38 +01:00
import com.legacy.aether.blocks.BlocksAether;
2018-12-07 05:33:43 +01:00
import com.legacy.aether.entities.EntitiesAether;
2017-11-28 05:02:38 +01:00
import com.legacy.aether.items.ItemsAether;
2018-12-07 05:33:43 +01:00
import com.legacy.aether.network.AetherNetwork;
import com.legacy.aether.player.PlayerAetherEvents;
import com.legacy.aether.player.perks.AetherRankings;
2017-11-28 05:02:38 +01:00
import com.legacy.aether.registry.AetherRegistries;
import com.legacy.aether.registry.achievements.AchievementsAether;
import com.legacy.aether.registry.creative_tabs.AetherCreativeTabs;
2018-12-07 05:33:43 +01:00
import com.legacy.aether.tileentity.AetherTileEntities;
2017-11-28 05:02:38 +01:00
import com.legacy.aether.world.AetherWorld;
2016-12-17 16:28:16 +01:00
2018-12-07 05:33:43 +01:00
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
2018-12-30 08:27:48 +01:00
@Mod(modid = Aether.MOD_ID, version = "v1.0.1")
2018-12-07 06:32:48 +01:00
public class Aether {
2016-12-17 16:28:16 +01:00
2018-12-07 05:33:43 +01:00
public static final String MOD_ID = "aether_legacy";
2016-12-17 16:28:16 +01:00
2018-12-07 05:33:43 +01:00
@Instance(Aether.MOD_ID)
2016-12-17 16:28:16 +01:00
public static Aether instance;
2018-12-07 05:33:43 +01:00
@SidedProxy(clientSide = "com.legacy.aether.client.ClientProxy", serverSide = "com.legacy.aether.CommonProxy")
2017-12-24 05:48:56 +01:00
public static CommonProxy proxy;
2016-12-17 16:28:16 +01:00
2018-12-07 06:32:48 +01:00
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
AetherRankings.initialization();
AetherNetwork.preInitialization();
AetherConfig.init(event.getModConfigurationDirectory());
}
2018-12-07 05:33:43 +01:00
2018-12-07 06:32:48 +01:00
@EventHandler
public void init(FMLInitializationEvent event) {
BlocksAether.initialization();
BlocksAether.initializeHarvestLevels();
2018-12-07 06:32:48 +01:00
ItemsAether.initialization();
AetherRegistries.register();
EntitiesAether.initialization();
AetherCreativeTabs.initialization();
AetherTileEntities.initialization();
AetherWorld.initialization();
AchievementsAether.initialization();
2018-12-07 05:33:43 +01:00
2018-12-07 06:32:48 +01:00
proxy.init();
2018-12-07 05:33:43 +01:00
2018-12-07 06:32:48 +01:00
CommonProxy.registerEvent(new PlayerAetherEvents());
CommonProxy.registerEvent(new AetherEventHandler());
CommonProxy.registerEvent(new AetherEntityEvents());
2018-12-07 06:32:48 +01:00
}
2016-12-17 16:28:16 +01:00
2018-12-07 06:32:48 +01:00
public static ResourceLocation locate(String location) {
2018-12-07 05:33:43 +01:00
return new ResourceLocation(MOD_ID, location);
2016-12-17 16:28:16 +01:00
}
2018-12-07 06:32:48 +01:00
public static String find(String location) {
2018-12-07 05:33:43 +01:00
return modAddress() + location;
2016-12-17 16:28:16 +01:00
}
2018-12-07 06:32:48 +01:00
public static String modAddress() {
2018-12-07 05:33:43 +01:00
return MOD_ID + ":";
2016-12-17 16:28:16 +01:00
}
2018-12-07 05:33:43 +01:00
}