@SuppressWarnings("unchecked")
    private static <T extends GenericEvent<? extends F>, F> void addGenericListener(IEventBus eventBus, Class<?> genericClassFilter, SubscribeEvent annotation, Class<?> eventType, Consumer<?> consumer) {
        eventBus.addGenericListener((Class<F>) genericClassFilter, annotation.priority(), annotation.receiveCanceled(), (Class<T>) eventType, (Consumer<T>) consumer);
    }
Handles casting generics for {@link IEventBus#addGenericListener}.
forge/src/main/java/me/lucko/luckperms/forge/util/ForgeEventBusFacade.java