package com.vanaf3.config;

import net.minecraftforge.common.config.Configuration;
import java.io.File;

public class VanafConfig {
    private static Configuration config;
    
    // Options configurables
    public static String customText = "VANADIUM V1";
    public static boolean showCoords = true;
    public static boolean showDirection = true;
    public static boolean showBiome = true;
    public static boolean showRAM = true;
    
    public static void init(File configFile) {
        config = new Configuration(configFile);
        
        try {
            config.load();
            
            customText = config.getString("customText", "display", "VANADIUM V1", 
                "Custom text shown at the top");
            showCoords = config.getBoolean("showCoords", "display", true, 
                "Show player coordinates");
            showDirection = config.getBoolean("showDirection", "display", true, 
                "Show player direction");
            showBiome = config.getBoolean("showBiome", "display", true, 
                "Show current biome");
            showRAM = config.getBoolean("showRAM", "display", true, 
                "Show RAM usage");
            
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (config.hasChanged()) {
                config.save();
            }
        }
    }
}