equivalent-exchange-3/src/main/java/com/pahimar/ee3/reference/Files.java

44 lines
1.9 KiB
Java
Raw Normal View History

2014-09-15 22:06:20 +02:00
package com.pahimar.ee3.reference;
import com.pahimar.ee3.exchange.EnergyValueRegistry;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import java.io.File;
2016-05-11 21:59:52 +02:00
public class Files {
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";
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);
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
}