I suggest you move this block of code to https://github.com/MinecraftForge/MinecraftForge/blob/master/common/net/minecraftforge/event/ForgeEventFactory.java