2014-09-15 22:06:20 +02:00
|
|
|
package com.pahimar.ee3.reference;
|
|
|
|
|
2016-05-18 19:53:13 +02:00
|
|
|
import com.pahimar.ee3.exchange.EnergyValueRegistry;
|
2015-06-10 05:25:40 +02:00
|
|
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
2016-05-11 21:59:52 +02:00
|
|
|
public class Files {
|
2016-05-14 04:28:10 +02:00
|
|
|
|
2016-05-19 01:51:55 +02:00
|
|
|
public static File dataDirectory;
|
|
|
|
|
|
|
|
private static final String ENERGY_VALUES_JSON = "energy-values.json";
|
|
|
|
private static final String PRE_CALCULATION_ENERGY_VALUES = "pre-calculation-energy-values.json";
|
|
|
|
private static final String POST_CALCULATION_ENERGY_VALUES = "post-calculation-energy-values.json";
|
2016-05-14 04:28:10 +02:00
|
|
|
|
2015-02-01 05:47:45 +01:00
|
|
|
public static final String TEMPLATE_JSON_FILE = "template.json";
|
2015-02-10 01:08:18 +01:00
|
|
|
public static final String ABILITIES_JSON_FILE = "abilities.json";
|
2016-05-11 21:59:52 +02:00
|
|
|
|
|
|
|
public static File abilitiesDataDirectory;
|
|
|
|
public static File knowledgeDataDirectory;
|
|
|
|
|
|
|
|
public static File abilitiesDataFile;
|
|
|
|
public static File knowledgeDataFile;
|
|
|
|
|
|
|
|
public static void init(FMLPreInitializationEvent event) {
|
|
|
|
|
|
|
|
dataDirectory = new File(event.getModConfigurationDirectory().getParentFile(), "data" + File.separator + Reference.LOWERCASE_MOD_ID);
|
|
|
|
|
2016-05-18 19:53:13 +02:00
|
|
|
EnergyValueRegistry.energyValuesDirectory = new File(dataDirectory, "energy-values");
|
|
|
|
EnergyValueRegistry.energyValuesDirectory.mkdirs();
|
|
|
|
EnergyValueRegistry.energyValuesFile = new File(EnergyValueRegistry.energyValuesDirectory, ENERGY_VALUES_JSON);
|
|
|
|
EnergyValueRegistry.preCalculationValuesFile = new File(EnergyValueRegistry.energyValuesDirectory, PRE_CALCULATION_ENERGY_VALUES);
|
|
|
|
EnergyValueRegistry.postCalculationValuesFile = new File(EnergyValueRegistry.energyValuesDirectory, POST_CALCULATION_ENERGY_VALUES);
|
2016-05-11 21:59:52 +02:00
|
|
|
|
|
|
|
abilitiesDataDirectory = new File(dataDirectory, "abilities");
|
|
|
|
abilitiesDataDirectory.mkdirs();
|
|
|
|
abilitiesDataFile = new File(abilitiesDataDirectory, ABILITIES_JSON_FILE);
|
|
|
|
|
|
|
|
knowledgeDataDirectory = new File(dataDirectory, "knowledge");
|
|
|
|
knowledgeDataDirectory.mkdirs();
|
|
|
|
knowledgeDataFile = new File(knowledgeDataDirectory, TEMPLATE_JSON_FILE);
|
|
|
|
}
|
2014-09-15 22:06:20 +02:00
|
|
|
}
|