package fr.helios.astral; 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.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; import fr.helios.astral.items.ItemArmorAstral; import fr.helios.astral.items.ItemsAstral; import fr.helios.astral.proxy.ServerProxy; import fr.helios.astral.utils.LivingEventHandler; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.event.entity.living.LivingEvent; @Mod(modid = References.MODID, name = References.NAME, version = References.VERSION, acceptedMinecraftVersions = References.MINECRAFT_VERSION) public class ModAstral { public static Item luminous_wand; public static Item helmet_astral; public static Item chestpalte_astral; public static Item leggings_astral; public static Item boots_astral; public static ArmorMaterial armorAstral = EnumHelper.addArmorMaterial("armorAstral", 1000, new int[]{10, 30, 20, 8}, 30); @Instance(References.MODID) public static ModAstral instance; @SidedProxy(clientSide = References.CLIENT_PROXY, serverSide = References.SERVER_PROXY, modId = References.MODID) public static ServerProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { luminous_wand = new ItemsAstral().setUnlocalizedName("luminous_wand").setTextureName(References.MODID + ":luminous_wand"); helmet_astral = new ItemArmorAstral(armorAstral, 0).setUnlocalizedName("helmet_astral").setTextureName(References.MODID + ":helmet_astral"); chestpalte_astral = new ItemArmorAstral(armorAstral, 1).setUnlocalizedName("chestpalte_astral").setTextureName(References.MODID + ":chestpalte_astral"); leggings_astral = new ItemArmorAstral(armorAstral, 2).setUnlocalizedName("leggings_astral").setTextureName(References.MODID + ":leggings_astral"); boots_astral = new ItemArmorAstral(armorAstral, 3).setUnlocalizedName("boots_astral").setTextureName(References.MODID + ":boots_astral"); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRender(); GameRegistry.registerItem(luminous_wand, "luminous_wand"); GameRegistry.registerItem(helmet_astral, "helmet_astral"); GameRegistry.registerItem(chestpalte_astral, "chestpalte_astral"); GameRegistry.registerItem(leggings_astral, "leggings_astral"); GameRegistry.registerItem(boots_astral, "boots_astral"); MinecraftForge.EVENT_BUS.register(new LivingEventHandler()); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } }