use of com.demod.factorio.ModInfo in project Factorio-FBSR by demodude4u.
the class FBSR method getVersion.
public static String getVersion() {
if (version == null) {
ModInfo baseInfo;
try {
baseInfo = new ModInfo(Utils.readJsonFromStream(new FileInputStream(new File(FactorioData.factorio, "data/base/info.json"))));
version = baseInfo.getVersion();
} catch (JSONException | IOException e) {
e.printStackTrace();
System.exit(-1);
}
}
return version;
}
Aggregations