externalize event handling from config system to avoid classloading issues

This commit is contained in:
FalsePattern committed 2022-08-30 20:16:19 +02:00
1 parent 07a88af459
commit 5f753bafda
7 files changed
+199 -80

No files matched your search

@@ -22,6 +22,8 @@ package com.falsepattern.lib.internal.proxy;
import com.falsepattern.lib.internal.Share;
import com.falsepattern.lib.internal.Tags;
import com.falsepattern.lib.internal.impl.config.event.ClientEventHandlerPost;
import com.falsepattern.lib.internal.impl.config.event.ClientEventHandlerPre;
import com.falsepattern.lib.internal.impl.toast.GuiToastImpl;
import com.falsepattern.lib.updates.UpdateChecker;
import lombok.val;
@@ -55,12 +57,14 @@ public class ClientProxy extends CommonProxy {
@Override
public void preInit(FMLPreInitializationEvent e) {
super.preInit(e);
ClientEventHandlerPre.registerBus();
MinecraftForge.EVENT_BUS.register(this);
}
@Override
public void postInit(FMLPostInitializationEvent e) {
super.postInit(e);
ClientEventHandlerPost.registerBus();
chatFuture = updatesFuture.handleAsync((updates, exception) -> {
if (exception != null || updates.isEmpty()) {
return Collections.emptyList();