Blarg
This commit is contained in:
parent
d5d03c61f6
commit
22c8dee145
|
@ -119,7 +119,7 @@ public class EquivalentExchange3
|
||||||
{
|
{
|
||||||
CachedOreDictionary.getInstance();
|
CachedOreDictionary.getInstance();
|
||||||
Abilities.initNotLearnables();
|
Abilities.initNotLearnables();
|
||||||
NewEnergyValueRegistry.INSTANCE.load();
|
NewEnergyValueRegistry.INSTANCE.compute();
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
|
|
@ -136,7 +136,7 @@ public class NewEnergyValueRegistry {
|
||||||
.forEach(wrappedStack -> stackValueMap.put(wrappedStack, preCalculationValueMap.get(wrappedStack)));
|
.forEach(wrappedStack -> stackValueMap.put(wrappedStack, preCalculationValueMap.get(wrappedStack)));
|
||||||
|
|
||||||
// Calculate values from the known methods to create items, and the pre-calculation value mappings
|
// Calculate values from the known methods to create items, and the pre-calculation value mappings
|
||||||
// TODO Re-implement DynEMC here
|
calculate();
|
||||||
|
|
||||||
// Add in all post-calculation energy value mappings
|
// Add in all post-calculation energy value mappings
|
||||||
postCalculationValueMap.keySet().stream()
|
postCalculationValueMap.keySet().stream()
|
||||||
|
@ -152,6 +152,35 @@ public class NewEnergyValueRegistry {
|
||||||
save();
|
save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void calculate() {
|
||||||
|
|
||||||
|
Map<WrappedStack, EnergyValue> computedMap;
|
||||||
|
int passNumber, passComputed, totalComputed;
|
||||||
|
passNumber = passComputed = totalComputed = 0;
|
||||||
|
boolean firstPass = true;
|
||||||
|
|
||||||
|
LogHelper.info(ENERGY_VALUE_MARKER, "Beginning energy value calculation");
|
||||||
|
long startingTime = System.nanoTime();
|
||||||
|
while ((firstPass || passComputed > 0) && passNumber < 16) {
|
||||||
|
|
||||||
|
long passStartTime = System.nanoTime();
|
||||||
|
passNumber++;
|
||||||
|
passComputed = 0;
|
||||||
|
if (firstPass) {
|
||||||
|
firstPass = false;
|
||||||
|
}
|
||||||
|
long passDuration = System.nanoTime() - passStartTime;
|
||||||
|
|
||||||
|
// TODO Tie this extra logging into a debug config option
|
||||||
|
boolean debug = false;
|
||||||
|
if (debug) {
|
||||||
|
LogHelper.info(ENERGY_VALUE_MARKER, "Pass {}: Calculated {} values for objects in {} ns", passNumber, passComputed, passDuration);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
long endingTime = System.nanoTime() - startingTime;
|
||||||
|
LogHelper.info(ENERGY_VALUE_MARKER, "Finished dynamic value calculation (calculated {} values for objects in {} ns)", totalComputed, endingTime);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves the pre-calculation, post-calculation, and calculated energy value maps to disk
|
* Saves the pre-calculation, post-calculation, and calculated energy value maps to disk
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -56,17 +56,17 @@ public class ModItems
|
||||||
GameRegistry.registerItem(knowledgeScroll, Names.Items.KNOWLEDGE_SCROLL);
|
GameRegistry.registerItem(knowledgeScroll, Names.Items.KNOWLEDGE_SCROLL);
|
||||||
GameRegistry.registerItem(potionLethe, Names.Items.POTION_LETHE);
|
GameRegistry.registerItem(potionLethe, Names.Items.POTION_LETHE);
|
||||||
|
|
||||||
GameRegistry.registerItem(shovelDarkMatter, Names.Tools.DARK_MATTER_SHOVEL);
|
// GameRegistry.registerItem(shovelDarkMatter, Names.Tools.DARK_MATTER_SHOVEL);
|
||||||
GameRegistry.registerItem(pickAxeDarkMatter, Names.Tools.DARK_MATTER_PICKAXE);
|
// GameRegistry.registerItem(pickAxeDarkMatter, Names.Tools.DARK_MATTER_PICKAXE);
|
||||||
GameRegistry.registerItem(hammerDarkMatter, Names.Tools.DARK_MATTER_HAMMER);
|
// GameRegistry.registerItem(hammerDarkMatter, Names.Tools.DARK_MATTER_HAMMER);
|
||||||
GameRegistry.registerItem(axeDarkMatter, Names.Tools.DARK_MATTER_AXE);
|
// GameRegistry.registerItem(axeDarkMatter, Names.Tools.DARK_MATTER_AXE);
|
||||||
GameRegistry.registerItem(hoeDarkMatter, Names.Tools.DARK_MATTER_HOE);
|
// GameRegistry.registerItem(hoeDarkMatter, Names.Tools.DARK_MATTER_HOE);
|
||||||
GameRegistry.registerItem(fishingRodDarkMatter, Names.Tools.DARK_MATTER_FISHING_ROD);
|
// GameRegistry.registerItem(fishingRodDarkMatter, Names.Tools.DARK_MATTER_FISHING_ROD);
|
||||||
GameRegistry.registerItem(shearsDarkMatter, Names.Tools.DARK_MATTER_SHEARS);
|
// GameRegistry.registerItem(shearsDarkMatter, Names.Tools.DARK_MATTER_SHEARS);
|
||||||
|
|
||||||
GameRegistry.registerItem(bowDarkMatter, Names.Weapons.DARK_MATTER_BOW);
|
// GameRegistry.registerItem(bowDarkMatter, Names.Weapons.DARK_MATTER_BOW);
|
||||||
GameRegistry.registerItem(arrowDarkMatter, Names.Weapons.DARK_MATTER_ARROW);
|
// GameRegistry.registerItem(arrowDarkMatter, Names.Weapons.DARK_MATTER_ARROW);
|
||||||
GameRegistry.registerItem(swordDarkMatter, Names.Weapons.DARK_MATTER_SWORD);
|
// GameRegistry.registerItem(swordDarkMatter, Names.Weapons.DARK_MATTER_SWORD);
|
||||||
|
|
||||||
// Helm
|
// Helm
|
||||||
// Chest
|
// Chest
|
||||||
|
|
Loading…
Reference in a new issue