2015-11-02 20:39:44 +00:00
|
|
|
package WayofTime.bloodmagic;
|
2014-06-27 23:43:09 +00:00
|
|
|
|
2015-11-02 20:39:44 +00:00
|
|
|
import WayofTime.bloodmagic.api.util.helper.LogHelper;
|
|
|
|
import WayofTime.bloodmagic.network.AlchemicalWizardryPacketHandler;
|
2015-11-03 01:24:43 +00:00
|
|
|
import WayofTime.bloodmagic.proxy.CommonProxy;
|
2015-11-03 01:45:11 +00:00
|
|
|
import WayofTime.bloodmagic.registry.*;
|
2015-11-02 20:39:44 +00:00
|
|
|
import WayofTime.bloodmagic.util.handler.EventHandler;
|
|
|
|
import WayofTime.bloodmagic.util.helper.InventoryRenderHelper;
|
2015-10-30 03:22:14 +00:00
|
|
|
import lombok.Getter;
|
2014-11-20 13:27:53 +00:00
|
|
|
import net.minecraft.creativetab.CreativeTabs;
|
|
|
|
import net.minecraft.item.Item;
|
2015-10-30 05:22:08 +00:00
|
|
|
import net.minecraftforge.common.MinecraftForge;
|
|
|
|
import net.minecraftforge.fml.common.FMLCommonHandler;
|
2015-07-29 12:23:01 +00:00
|
|
|
import net.minecraftforge.fml.common.Mod;
|
|
|
|
import net.minecraftforge.fml.common.SidedProxy;
|
2015-11-03 01:24:43 +00:00
|
|
|
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
2015-07-29 12:23:01 +00:00
|
|
|
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
|
|
|
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
2014-06-27 23:43:09 +00:00
|
|
|
|
2015-10-30 03:22:14 +00:00
|
|
|
import java.io.File;
|
|
|
|
import java.util.Locale;
|
2014-11-04 00:27:51 +00:00
|
|
|
|
2015-11-02 20:39:44 +00:00
|
|
|
@Mod(modid = BloodMagic.MODID, name = BloodMagic.NAME, version = BloodMagic.VERSION, dependencies = BloodMagic.DEPEND, guiFactory = "WayofTime.bloodmagic.client.gui.ConfigGuiFactory")
|
2015-10-30 03:22:14 +00:00
|
|
|
@Getter
|
2015-11-02 20:39:44 +00:00
|
|
|
public class BloodMagic {
|
2014-10-13 20:33:20 +00:00
|
|
|
|
2015-11-02 20:39:44 +00:00
|
|
|
public static final String MODID = "BloodMagic";
|
2015-10-30 03:22:14 +00:00
|
|
|
public static final String NAME = "Blood Magic: Alchemical Wizardry";
|
|
|
|
public static final String VERSION = "@VERSION@";
|
|
|
|
public static final String DEPEND = "";
|
|
|
|
public static final String DOMAIN = MODID.toLowerCase(Locale.ENGLISH) + ":";
|
2014-10-13 20:33:20 +00:00
|
|
|
|
2015-11-02 20:39:44 +00:00
|
|
|
@SidedProxy(serverSide = "WayofTime.bloodmagic.proxy.CommonProxy", clientSide = "WayofTime.bloodmagic.proxy.ClientProxy")
|
2015-10-30 03:22:14 +00:00
|
|
|
public static CommonProxy proxy;
|
2014-06-27 23:43:09 +00:00
|
|
|
|
2015-10-30 05:22:08 +00:00
|
|
|
@Mod.Instance(MODID)
|
2015-11-02 20:39:44 +00:00
|
|
|
public static BloodMagic instance;
|
2014-06-27 23:43:09 +00:00
|
|
|
|
2015-10-30 03:22:14 +00:00
|
|
|
public static CreativeTabs tabBloodMagic = new CreativeTabs(MODID + ".creativeTab") {
|
2014-10-13 20:33:20 +00:00
|
|
|
@Override
|
2015-10-30 03:22:14 +00:00
|
|
|
public Item getTabIconItem() {
|
|
|
|
return ModItems.bloodOrb;
|
2014-10-13 20:33:20 +00:00
|
|
|
}
|
2014-06-27 23:43:09 +00:00
|
|
|
};
|
|
|
|
|
2015-10-30 03:22:14 +00:00
|
|
|
private InventoryRenderHelper renderHelper = new InventoryRenderHelper(DOMAIN);
|
|
|
|
private LogHelper logger = new LogHelper(MODID);
|
|
|
|
private File configDir;
|
2014-06-27 23:43:09 +00:00
|
|
|
|
2015-10-30 03:22:14 +00:00
|
|
|
@Mod.EventHandler
|
|
|
|
public void preInit(FMLPreInitializationEvent event) {
|
|
|
|
configDir = new File(event.getModConfigurationDirectory(), "BloodMagic");
|
|
|
|
ConfigHandler.init(new File(getConfigDir(), "BloodMagic.cfg"));
|
2014-10-13 20:33:20 +00:00
|
|
|
|
2015-10-30 05:22:08 +00:00
|
|
|
EventHandler eventHandler = new EventHandler();
|
|
|
|
FMLCommonHandler.instance().bus().register(eventHandler);
|
|
|
|
MinecraftForge.EVENT_BUS.register(eventHandler);
|
2014-10-13 20:33:20 +00:00
|
|
|
|
2015-10-30 03:22:14 +00:00
|
|
|
ModBlocks.init();
|
2015-10-30 05:22:08 +00:00
|
|
|
ModItems.init();
|
2015-10-30 03:22:14 +00:00
|
|
|
ModPotions.init();
|
|
|
|
ModEntities.init();
|
2015-10-30 05:22:08 +00:00
|
|
|
|
|
|
|
proxy.preInit();
|
2014-08-10 18:38:51 +00:00
|
|
|
}
|
2015-03-21 14:10:25 +00:00
|
|
|
|
2015-10-30 03:22:14 +00:00
|
|
|
@Mod.EventHandler
|
2015-11-03 01:24:43 +00:00
|
|
|
public void init(FMLInitializationEvent event) {
|
2015-10-30 23:54:59 +00:00
|
|
|
AlchemicalWizardryPacketHandler.init();
|
|
|
|
|
2015-11-07 16:51:41 +00:00
|
|
|
ModRecipes.init();
|
2015-11-03 01:45:11 +00:00
|
|
|
ModRituals.initRituals();
|
|
|
|
ModRituals.initImperfectRituals();
|
|
|
|
ConfigHandler.checkRituals();
|
|
|
|
|
2015-10-30 03:22:14 +00:00
|
|
|
proxy.init();
|
2014-10-31 19:31:56 +00:00
|
|
|
}
|
2014-11-12 22:14:43 +00:00
|
|
|
|
2015-10-30 03:22:14 +00:00
|
|
|
@Mod.EventHandler
|
|
|
|
public void postInit(FMLPostInitializationEvent event) {
|
|
|
|
proxy.postInit();
|
2014-12-14 00:17:38 +00:00
|
|
|
}
|
2014-06-27 23:43:09 +00:00
|
|
|
}
|