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

46 lines
1.9 KiB
Java
Raw Normal View History

2014-09-15 22:06:20 +02:00
package com.pahimar.ee3.reference;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import java.io.File;
2014-09-15 22:06:20 +02:00
public class Files
{
public static final String PRE_CALCULATION_ENERGY_VALUES = "pre-calculation-energy-values.json";
public 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";
2015-05-01 20:21:59 +02:00
public static final String STATIC_ENERGY_VALUES_JSON = "energy-values.json.gz";
public static class Global
{
public static File dataDirectory;
public static File preCalcluationEnergyValueFile;
public static File postCalcluationEnergyValueFile;
public static File abilityFile;
public static File templateTransmutationKnowledgeFile;
public static void init(FMLPreInitializationEvent event)
{
dataDirectory = new File(event.getModConfigurationDirectory().getParentFile(), "data" + File.separator + Reference.LOWERCASE_MOD_ID);
dataDirectory.mkdirs();
File energyValueDataDirectory = new File(dataDirectory, "energyvalues");
energyValueDataDirectory.mkdirs();
preCalcluationEnergyValueFile = new File(energyValueDataDirectory, PRE_CALCULATION_ENERGY_VALUES);
postCalcluationEnergyValueFile = new File(energyValueDataDirectory, POST_CALCULATION_ENERGY_VALUES);
File abilityDataDirectory = new File(dataDirectory, "abilities");
abilityDataDirectory.mkdirs();
abilityFile = new File(abilityDataDirectory, ABILITIES_JSON_FILE);
File knowledgeDataDirectory = new File(dataDirectory, "knowledge");
knowledgeDataDirectory.mkdirs();
templateTransmutationKnowledgeFile = new File(knowledgeDataDirectory, TEMPLATE_JSON_FILE);
}
}
2014-09-15 22:06:20 +02:00
}