diff --git a/src/main/java/org/cyclops/integratedrest/IntegratedRest.java b/src/main/java/org/cyclops/integratedrest/IntegratedRest.java index b274c1e..3c2c828 100644 --- a/src/main/java/org/cyclops/integratedrest/IntegratedRest.java +++ b/src/main/java/org/cyclops/integratedrest/IntegratedRest.java @@ -52,6 +52,10 @@ public IntegratedRest(IEventBus modEventBus) { super(Reference.MOD_ID, (instance) -> _instance = instance, modEventBus); server = new HttpServer(); + // Registries + getRegistryManager().addRegistry(IRequestHandlerRegistry.class, RequestHandlerRegistry.getInstance()); + getRegistryManager().addRegistry(IValueTypeJsonHandlerRegistry.class, ValueTypeJsonHandlerRegistry.getInstance()); + NeoForge.EVENT_BUS.addListener(this::onApiServerStarted); NeoForge.EVENT_BUS.addListener(this::onApiServerStopping); modEventBus.addListener(this::onSetup); @@ -61,10 +65,6 @@ public IntegratedRest(IEventBus modEventBus) { protected void setup(FMLCommonSetupEvent event) { super.setup(event); - // Registries - getRegistryManager().addRegistry(IRequestHandlerRegistry.class, RequestHandlerRegistry.getInstance()); - getRegistryManager().addRegistry(IValueTypeJsonHandlerRegistry.class, ValueTypeJsonHandlerRegistry.getInstance()); - if (MinecraftHelpers.isClientSide()) { HttpVariableModelProviders.load(); }