2014-07-14 18:04:20 +02:00
|
|
|
package com.pahimar.ee3.exchange;
|
2014-06-20 21:57:27 +02:00
|
|
|
|
2015-06-10 05:25:40 +02:00
|
|
|
import com.pahimar.ee3.recipe.AludelRecipeManager;
|
|
|
|
import com.pahimar.ee3.recipe.RecipeRegistry;
|
2014-06-20 21:57:27 +02:00
|
|
|
import com.pahimar.ee3.util.LogHelper;
|
|
|
|
|
|
|
|
public class DynamicEnergyValueInitThread implements Runnable
|
|
|
|
{
|
|
|
|
private static DynamicEnergyValueInitThread instance = new DynamicEnergyValueInitThread();
|
|
|
|
|
|
|
|
public static void initEnergyValueRegistry()
|
|
|
|
{
|
2015-04-19 21:01:35 +02:00
|
|
|
new Thread(instance, "DynamicEMC Thread").start();
|
2014-06-20 21:57:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void run()
|
|
|
|
{
|
2015-06-10 05:25:40 +02:00
|
|
|
// Add in recipes to the RecipeRegistry *just* before we do calculations
|
|
|
|
RecipeRegistry.getInstance().registerVanillaRecipes();
|
|
|
|
AludelRecipeManager.registerRecipes();
|
|
|
|
|
2014-06-20 21:57:27 +02:00
|
|
|
long startTime = System.currentTimeMillis();
|
2014-07-14 18:04:20 +02:00
|
|
|
EnergyValueRegistry.getInstance().init();
|
2015-11-19 21:24:40 +01:00
|
|
|
LogHelper.info(EnergyValueRegistry.ENERGY_VALUE_MARKER, "DynamicEMC system initialized after {} ms", System.currentTimeMillis() - startTime);
|
2014-06-20 21:57:27 +02:00
|
|
|
}
|
|
|
|
}
|