@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
logger = event.getModLog();
knightArmourMaterial = EnumHelper.addArmorMaterial("knights.armour", "battlegear2:knight", 25, new int[]{3, 5, 7, 3}, 15, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 1.5F);
ResourceLocation sound = new ResourceLocation(MODID, "shield");
shieldSound = GameRegistry.register(new SoundEvent(sound).setRegistryName(sound));
BattlegearConfig.getConfig(new Configuration(event.getSuggestedConfigurationFile()));
if((event.getSourceFile().getName().endsWith(".jar") || debug) && event.getSide().isClient()){
try {
Class.forName("mods.mud.ModUpdateDetector").getDeclaredMethod("registerMod", ModContainer.class, String.class, String.class).invoke(null,
FMLCommonHandler.instance().findContainerFor(this),
"https://raw.github.com/Mine-and-blade-admin/Battlegear2/master/battlegear_update.xml",
"https://raw.github.com/Mine-and-blade-admin/Battlegear2/master/changelog.md"
);
} catch (Throwable e) {
e.printStackTrace();
}
}
proxy.registerHandlers();
QuiverArrowRegistry.addArrowToRegistry(Items.ARROW, EntityTippedArrow.class);
QuiverArrowRegistry.addArrowToRegistry(Items.TIPPED_ARROW, EntityTippedArrow.class);
QuiverArrowRegistry.addArrowToRegistry(Items.SPECTRAL_ARROW, EntitySpectralArrow.class);
IMCEvent imc = new IMCEvent();
imc.applyModContainer(FMLCommonHandler.instance().findContainerFor(MODID));
onMessage(imc);
}