Move a bunch of API calls to IMC, making them thread safe in the process

This commit is contained in:
Vincent Lee committed 2019-04-06 21:27:17 -05:00
1 parent b1b37b4c5a
commit 3c71d46b82
13 files changed
+326 -162

No files matched your search

@@ -56,6 +56,7 @@ import vazkii.botania.common.core.command.CommandShare;
import vazkii.botania.common.core.command.CommandSkyblockSpread;
import vazkii.botania.common.core.handler.ConfigHandler;
import vazkii.botania.common.core.handler.IMCHandler;
import vazkii.botania.common.core.handler.IMCSender;
import vazkii.botania.common.core.handler.InternalMethodHandler;
import vazkii.botania.common.core.handler.ManaNetworkHandler;
import vazkii.botania.common.core.loot.BindUuid;
@@ -127,6 +128,7 @@ public class Botania {
proxy = DistExecutor.runForDist(() -> ClientProxy::new, () -> ServerProxy::new);
proxy.registerHandlers();
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::commonSetup);
FMLJavaModLoadingContext.get().getModEventBus().addListener(IMCSender::enqueue);
FMLJavaModLoadingContext.get().getModEventBus().addListener(IMCHandler::handle);
ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, ConfigHandler.CLIENT_SPEC);
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, ConfigHandler.COMMON_SPEC);