2015-03-07 12:51:28 +01:00
|
|
|
package ellpeck.actuallyadditions;
|
2014-11-10 16:47:04 +01:00
|
|
|
|
2015-02-17 16:15:16 +01:00
|
|
|
import cpw.mods.fml.common.Mod;
|
2015-02-20 22:45:33 +01:00
|
|
|
import cpw.mods.fml.common.Mod.EventHandler;
|
|
|
|
import cpw.mods.fml.common.Mod.Instance;
|
2015-02-17 16:15:16 +01:00
|
|
|
import cpw.mods.fml.common.SidedProxy;
|
2015-06-29 20:55:56 +02:00
|
|
|
import cpw.mods.fml.common.event.*;
|
2015-03-07 12:51:28 +01:00
|
|
|
import ellpeck.actuallyadditions.achievement.InitAchievements;
|
|
|
|
import ellpeck.actuallyadditions.blocks.InitBlocks;
|
2015-06-28 03:12:32 +02:00
|
|
|
import ellpeck.actuallyadditions.communication.InterModCommunications;
|
2015-03-07 12:51:28 +01:00
|
|
|
import ellpeck.actuallyadditions.config.ConfigurationHandler;
|
2015-07-01 16:06:40 +02:00
|
|
|
import ellpeck.actuallyadditions.crafting.CrusherCrafting;
|
2015-03-07 12:51:28 +01:00
|
|
|
import ellpeck.actuallyadditions.crafting.InitCrafting;
|
2015-06-21 02:28:49 +02:00
|
|
|
import ellpeck.actuallyadditions.crafting.ItemCrafting;
|
2015-03-07 12:51:28 +01:00
|
|
|
import ellpeck.actuallyadditions.event.InitEvents;
|
2015-04-06 15:51:59 +02:00
|
|
|
import ellpeck.actuallyadditions.gen.InitVillager;
|
2015-03-07 12:51:28 +01:00
|
|
|
import ellpeck.actuallyadditions.gen.OreGen;
|
|
|
|
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
|
|
|
import ellpeck.actuallyadditions.items.InitItems;
|
2015-06-12 21:29:21 +02:00
|
|
|
import ellpeck.actuallyadditions.items.ItemCoffee;
|
2015-07-11 05:24:04 +02:00
|
|
|
import ellpeck.actuallyadditions.material.InitArmorMaterials;
|
|
|
|
import ellpeck.actuallyadditions.material.InitToolMaterials;
|
2015-06-29 20:55:56 +02:00
|
|
|
import ellpeck.actuallyadditions.misc.DispenserHandlerEmptyBucket;
|
|
|
|
import ellpeck.actuallyadditions.misc.DispenserHandlerFertilize;
|
2015-03-07 12:51:28 +01:00
|
|
|
import ellpeck.actuallyadditions.network.PacketHandler;
|
2015-07-02 10:45:15 +02:00
|
|
|
import ellpeck.actuallyadditions.ore.InitOreDict;
|
2015-03-07 12:51:28 +01:00
|
|
|
import ellpeck.actuallyadditions.proxy.IProxy;
|
2015-05-20 22:39:43 +02:00
|
|
|
import ellpeck.actuallyadditions.recipe.FuelHandler;
|
2015-06-28 03:12:32 +02:00
|
|
|
import ellpeck.actuallyadditions.recipe.HairyBallHandler;
|
2015-07-10 13:08:20 +02:00
|
|
|
import ellpeck.actuallyadditions.recipe.TreasureChestHandler;
|
2015-03-07 12:51:28 +01:00
|
|
|
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
2015-03-29 15:29:05 +02:00
|
|
|
import ellpeck.actuallyadditions.util.ModUtil;
|
2015-03-07 12:51:28 +01:00
|
|
|
import ellpeck.actuallyadditions.util.Util;
|
2014-11-10 16:47:04 +01:00
|
|
|
|
2015-07-01 16:32:21 +02:00
|
|
|
@Mod(modid = ModUtil.MOD_ID, name = ModUtil.NAME, version = ModUtil.VERSION, canBeDeactivated = false)
|
2015-03-07 12:51:28 +01:00
|
|
|
public class ActuallyAdditions{
|
2014-11-10 16:47:04 +01:00
|
|
|
|
2015-03-29 15:29:05 +02:00
|
|
|
@Instance(ModUtil.MOD_ID)
|
2015-03-07 12:51:28 +01:00
|
|
|
public static ActuallyAdditions instance;
|
2014-11-10 16:47:04 +01:00
|
|
|
|
2015-03-07 12:51:28 +01:00
|
|
|
@SidedProxy(clientSide = "ellpeck.actuallyadditions.proxy.ClientProxy", serverSide = "ellpeck.actuallyadditions.proxy.ServerProxy")
|
2014-12-03 21:55:53 +01:00
|
|
|
public static IProxy proxy;
|
|
|
|
|
2015-06-21 02:28:49 +02:00
|
|
|
@EventHandler
|
2014-11-10 16:47:04 +01:00
|
|
|
public void preInit(FMLPreInitializationEvent event){
|
2015-07-01 21:32:48 +02:00
|
|
|
ModUtil.LOGGER.info("Starting PreInitialization Phase...");
|
2015-02-09 17:25:05 +01:00
|
|
|
|
|
|
|
ConfigurationHandler.init(event.getSuggestedConfigurationFile());
|
2015-06-12 19:12:06 +02:00
|
|
|
PacketHandler.init();
|
2015-07-11 05:24:04 +02:00
|
|
|
InitToolMaterials.init();
|
|
|
|
InitArmorMaterials.init();
|
2014-11-10 16:47:04 +01:00
|
|
|
InitBlocks.init();
|
|
|
|
InitItems.init();
|
2015-04-06 15:51:59 +02:00
|
|
|
InitVillager.init();
|
2015-05-20 22:39:43 +02:00
|
|
|
FuelHandler.init();
|
2014-12-03 21:55:53 +01:00
|
|
|
proxy.preInit();
|
2015-02-09 17:25:05 +01:00
|
|
|
|
2015-07-01 21:32:48 +02:00
|
|
|
ModUtil.LOGGER.info("PreInitialization Finished.");
|
2014-11-10 16:47:04 +01:00
|
|
|
}
|
|
|
|
|
2015-06-21 02:28:49 +02:00
|
|
|
@EventHandler
|
2014-11-10 16:47:04 +01:00
|
|
|
public void init(FMLInitializationEvent event){
|
2015-07-01 21:32:48 +02:00
|
|
|
ModUtil.LOGGER.info("Starting Initialization Phase...");
|
2015-02-09 17:25:05 +01:00
|
|
|
|
2015-07-02 10:45:15 +02:00
|
|
|
InitOreDict.init();
|
2015-02-09 17:25:05 +01:00
|
|
|
InitAchievements.init();
|
2014-12-18 19:24:06 +01:00
|
|
|
GuiHandler.init();
|
|
|
|
OreGen.init();
|
|
|
|
TileEntityBase.init();
|
2015-03-07 02:23:31 +01:00
|
|
|
InitEvents.init();
|
|
|
|
InitCrafting.init();
|
2015-04-26 20:07:57 +02:00
|
|
|
FMLInterModComms.sendMessage("Waila", "register", "ellpeck.actuallyadditions.waila.WailaDataProvider.register");
|
2014-12-20 21:34:07 +01:00
|
|
|
proxy.init();
|
2015-02-09 17:25:05 +01:00
|
|
|
|
2015-07-01 21:32:48 +02:00
|
|
|
ModUtil.LOGGER.info("Initialization Finished.");
|
2014-11-10 16:47:04 +01:00
|
|
|
}
|
|
|
|
|
2015-06-21 02:28:49 +02:00
|
|
|
@EventHandler
|
2014-11-10 16:47:04 +01:00
|
|
|
public void postInit(FMLPostInitializationEvent event){
|
2015-07-01 21:32:48 +02:00
|
|
|
ModUtil.LOGGER.info("Starting PostInitialization Phase...");
|
2015-02-09 17:25:05 +01:00
|
|
|
|
2015-06-12 21:29:21 +02:00
|
|
|
ItemCoffee.initIngredients();
|
2015-07-01 16:06:40 +02:00
|
|
|
CrusherCrafting.init();
|
2015-06-21 02:28:49 +02:00
|
|
|
ItemCrafting.initMashedFoodRecipes();
|
2015-06-28 03:12:32 +02:00
|
|
|
HairyBallHandler.init();
|
2015-07-10 13:08:20 +02:00
|
|
|
TreasureChestHandler.init();
|
2014-12-03 21:55:53 +01:00
|
|
|
proxy.postInit();
|
2015-02-09 17:25:05 +01:00
|
|
|
|
2015-07-01 21:32:48 +02:00
|
|
|
ModUtil.LOGGER.info("PostInitialization Finished.");
|
2014-11-10 16:47:04 +01:00
|
|
|
}
|
2015-06-28 03:12:32 +02:00
|
|
|
|
|
|
|
@EventHandler
|
|
|
|
public void onIMCReceived(FMLInterModComms.IMCEvent event){
|
|
|
|
InterModCommunications.processIMC(event.getMessages());
|
|
|
|
}
|
2015-06-29 20:55:56 +02:00
|
|
|
|
|
|
|
@EventHandler
|
|
|
|
public void serverStarting(FMLServerStartingEvent event){
|
2015-07-01 21:32:48 +02:00
|
|
|
Util.registerDispenserHandler(InitItems.itemBucketOil, new DispenserHandlerEmptyBucket());
|
|
|
|
Util.registerDispenserHandler(InitItems.itemBucketCanolaOil, new DispenserHandlerEmptyBucket());
|
|
|
|
Util.registerDispenserHandler(InitItems.itemFertilizer, new DispenserHandlerFertilize());
|
2015-06-29 20:55:56 +02:00
|
|
|
}
|
2014-11-10 16:47:04 +01:00
|
|
|
}
|