NaturesAura/src/main/java/de/ellpeck/naturesaura/NaturesAura.java

67 lines
2.2 KiB
Java
Raw Normal View History

2018-10-13 20:35:18 +02:00
package de.ellpeck.naturesaura;
2018-10-13 23:46:30 +02:00
import de.ellpeck.naturesaura.blocks.ModBlocks;
2018-10-16 11:49:30 +02:00
import de.ellpeck.naturesaura.events.TerrainGenEvents;
2018-10-14 17:46:00 +02:00
import de.ellpeck.naturesaura.items.ModItems;
2018-10-14 14:27:18 +02:00
import de.ellpeck.naturesaura.packet.PacketHandler;
2018-10-13 20:35:18 +02:00
import de.ellpeck.naturesaura.proxy.IProxy;
2018-10-16 01:36:30 +02:00
import de.ellpeck.naturesaura.recipes.ModRecipes;
2018-10-13 20:35:18 +02:00
import de.ellpeck.naturesaura.reg.ModRegistry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
2018-10-16 11:49:30 +02:00
import net.minecraftforge.common.MinecraftForge;
2018-10-13 20:35:18 +02:00
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
2018-10-16 01:36:30 +02:00
import net.minecraftforge.fml.common.event.*;
2018-10-13 20:35:18 +02:00
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@Mod(modid = NaturesAura.MOD_ID, name = NaturesAura.MOD_NAME, version = NaturesAura.VERSION)
public final class NaturesAura {
public static final String MOD_ID = "naturesaura";
public static final String PROXY_LOCATION = "de.ellpeck." + MOD_ID + ".proxy.";
public static final String MOD_NAME = "Nature's Aura";
public static final String VERSION = "@VERSION@";
public static final Logger LOGGER = LogManager.getLogger(MOD_NAME);
@SidedProxy(modId = MOD_ID, clientSide = PROXY_LOCATION + "ClientProxy", serverSide = PROXY_LOCATION + "ServerProxy")
public static IProxy proxy;
public static final CreativeTabs CREATIVE_TAB = new CreativeTabs(MOD_ID) {
@Override
public ItemStack createIcon() {
2018-10-14 17:46:00 +02:00
return new ItemStack(ModItems.EYE);
2018-10-13 20:35:18 +02:00
}
};
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
2018-10-13 23:46:30 +02:00
new ModBlocks();
2018-10-14 17:46:00 +02:00
new ModItems();
2018-10-16 01:36:30 +02:00
2018-10-14 14:27:18 +02:00
PacketHandler.init();
2018-10-13 20:35:18 +02:00
ModRegistry.preInit(event);
2018-10-16 01:36:30 +02:00
2018-10-16 11:49:30 +02:00
MinecraftForge.TERRAIN_GEN_BUS.register(new TerrainGenEvents());
2018-10-16 01:36:30 +02:00
2018-10-13 20:35:18 +02:00
proxy.preInit(event);
}
@EventHandler
public void init(FMLInitializationEvent event) {
2018-10-16 01:36:30 +02:00
ModRecipes.init();
2018-10-13 20:35:18 +02:00
ModRegistry.init(event);
2018-10-16 01:36:30 +02:00
2018-10-13 20:35:18 +02:00
proxy.init(event);
}
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
ModRegistry.postInit(event);
proxy.postInit(event);
}
}