2017-03-22 04:19:39 +01:00
|
|
|
package com.legacy.aether.common;
|
2016-12-17 16:28:16 +01:00
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
import net.minecraftforge.common.config.Configuration;
|
|
|
|
|
|
|
|
public class AetherConfig
|
|
|
|
{
|
|
|
|
|
2017-05-26 00:32:07 +02:00
|
|
|
private static boolean christmas_content;
|
2016-12-17 16:28:16 +01:00
|
|
|
|
|
|
|
private static int aether_biome_id, aether_dimension_id;
|
|
|
|
|
2017-03-22 03:37:12 +01:00
|
|
|
private static boolean disable_trivia;
|
|
|
|
|
2017-03-05 00:21:36 +01:00
|
|
|
private static boolean skyrootBucketOnly;
|
|
|
|
|
2016-12-17 16:28:16 +01:00
|
|
|
public static void init(File location)
|
|
|
|
{
|
|
|
|
File newFile = new File(location + "/aether" + "/Aether_Legacy.cfg");
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
newFile.createNewFile();
|
|
|
|
}
|
|
|
|
catch (IOException e)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Configuration config = new Configuration(newFile);
|
|
|
|
|
|
|
|
config.load();
|
|
|
|
|
|
|
|
christmas_content = config.get("Aether World Generation", "Christmas Content", false).getBoolean(false);
|
|
|
|
|
|
|
|
aether_dimension_id = config.get("World Identification", "Aether Dimension ID", 4).getInt(4);
|
|
|
|
aether_biome_id = config.get("World Identification", "Aether Biome ID", 127).getInt(127);
|
|
|
|
|
2017-03-05 00:21:36 +01:00
|
|
|
skyrootBucketOnly = config.get("Misc", "Activate portal with only Skyroot bucket", false).getBoolean(false);
|
|
|
|
|
2017-03-22 03:37:12 +01:00
|
|
|
disable_trivia = config.get("Trivia", "Disable random trivia", false).getBoolean(false);
|
|
|
|
|
2016-12-17 16:28:16 +01:00
|
|
|
config.save();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static int getAetherDimensionID()
|
|
|
|
{
|
|
|
|
return AetherConfig.aether_dimension_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static int getAetherBiomeID()
|
|
|
|
{
|
|
|
|
return AetherConfig.aether_biome_id;
|
|
|
|
}
|
|
|
|
|
2017-03-22 03:37:12 +01:00
|
|
|
public static boolean triviaDisabled()
|
|
|
|
{
|
|
|
|
return AetherConfig.disable_trivia;
|
|
|
|
}
|
|
|
|
|
2016-12-17 16:28:16 +01:00
|
|
|
public static boolean shouldLoadHolidayContent()
|
|
|
|
{
|
|
|
|
return AetherConfig.christmas_content;
|
|
|
|
}
|
|
|
|
|
2017-03-05 00:21:36 +01:00
|
|
|
public static boolean activateOnlyWithSkyroot()
|
|
|
|
{
|
|
|
|
return AetherConfig.skyrootBucketOnly;
|
|
|
|
}
|
|
|
|
|
2016-12-17 16:28:16 +01:00
|
|
|
}
|