Add progress bar

This commit is contained in:
Danila Bolshakov 2016-12-13 11:41:38 +03:00
parent 248b88e8bc
commit 920ba2f0c3

View file

@ -4,6 +4,7 @@ import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.IFuelHandler; import cpw.mods.fml.common.IFuelHandler;
import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer; import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.ProgressManager;
import cpw.mods.fml.common.eventhandler.Event.Result; import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.gameevent.TickEvent;
@ -1682,9 +1683,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
public void activateOreDictHandler() { public void activateOreDictHandler() {
this.mOreDictActivated = true; this.mOreDictActivated = true;
ProgressManager.ProgressBar progressBar = ProgressManager.push("Register materials", mEvents.size());
OreDictEventContainer tEvent; OreDictEventContainer tEvent;
for (Iterator i$ = this.mEvents.iterator(); i$.hasNext(); registerRecipes(tEvent)) { for (Iterator i$ = this.mEvents.iterator(); i$.hasNext(); registerRecipes(tEvent)) {
tEvent = (OreDictEventContainer) i$.next(); tEvent = (OreDictEventContainer) i$.next();
progressBar.step(tEvent.mMaterial.toString());
} }
} }