Quark Oddities

Quark Oddities

22M Downloads

API events don't fire on startup

yungnickyoung opened this issue ยท 0 comments

commented

The MinecraftForge bus initializes as already being shut down:
public static final IEventBus EVENT_BUS = BusBuilder.builder().startShutdown().build();

And the first line in EventBus#post is the following: if (shutdown) return false;

This event bus's shutdown flag is not cleared until after mod loading is completed. This means that when the ModuleLoadedEvent and ModuleStateChangedEvent events are posted in QuarkModule, they do not properly dispatch when the game starts up:

public final void setEnabled(boolean enabled) {