@@ -0,0 +1,1061 @@
+package com.ewyboy.bibliotheca.common.event;%0A%0Aimport net.minecraftforge.common.MinecraftForge;%0Aimport net.minecraftforge.eventbus.api.Event;%0Aimport net.minecraftforge.eventbus.api.GenericEvent;%0Aimport net.minecraftforge.eventbus.api.IEventBus;%0Aimport net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;%0A%0Aimport java.util.function.Consumer;%0Aimport java.util.function.Supplier;%0A%0Apublic class EventHandler %7B%0A    public static final EventHandler FORGE = new EventHandler(() -%3E MinecraftForge.EVENT_BUS);%0A    public static final EventHandler MOD = new EventHandler(FMLJavaModLoadingContext.get()::getModEventBus);%0A    private final Supplier%3CIEventBus%3E bus;%0A%0A    public EventHandler(Supplier%3CIEventBus%3E bus) %7B%0A        this.bus = bus;%0A    %7D%0A%0A    public %3CT extends Event%3E void register(Consumer%3CT%3E consumer) %7B%0A        bus.get().addListener(consumer);%0A    %7D%0A%0A    public %3CT extends GenericEvent%3C? extends F%3E, F%3E void registerGeneric(Class%3CF%3E genericClassFilter, Consumer%3CT%3E consumer) %7B%0A        bus.get().addGenericListener(genericClassFilter, consumer);%0A    %7D%0A%0A%7D%0A

Add event handler