Search in sources :

Example 1 with FMLPreInitializationEvent

use of net.minecraftforge.fml.common.event.FMLPreInitializationEvent in project MinecraftForge by MinecraftForge.

the class LoadController method propogateStateMessage.

@Subscribe
public void propogateStateMessage(FMLEvent stateEvent) {
    if (stateEvent instanceof FMLPreInitializationEvent) {
        modObjectList = buildModObjectList();
    }
    ProgressBar bar = ProgressManager.push(stateEvent.description(), activeModList.size(), true);
    for (ModContainer mc : activeModList) {
        bar.step(mc.getName());
        sendEventToModContainer(stateEvent, mc);
    }
    ProgressManager.pop(bar);
}
Also used : FMLPreInitializationEvent(net.minecraftforge.fml.common.event.FMLPreInitializationEvent) ProgressBar(net.minecraftforge.fml.common.ProgressManager.ProgressBar) Subscribe(com.google.common.eventbus.Subscribe)

Aggregations

Subscribe (com.google.common.eventbus.Subscribe)1 ProgressBar (net.minecraftforge.fml.common.ProgressManager.ProgressBar)1 FMLPreInitializationEvent (net.minecraftforge.fml.common.event.FMLPreInitializationEvent)1