public static void DoLoad()
        {
            if (!Game1.IsMasterGame)
            {
                return;
            }

            // load data
            DeepWoodsState = ModEntry.GetHelper().Data.ReadSaveData <DeepWoodsStateData>("data");
            if (DeepWoodsState == null)
            {
                // legacy file
                FileInfo legacyFile = new FileInfo($"{Constants.CurrentSavePath}/{SAVE_FILE_NAME}.json");
                if (legacyFile.Exists)
                {
                    DeepWoodsState = JsonConvert.DeserializeObject <DeepWoodsStateData>(File.ReadAllText(legacyFile.FullName));
                }
            }
            if (DeepWoodsState == null)
            {
                DeepWoodsState = new DeepWoodsStateData();
            }

            // init settings
            Settings = ModEntry.GetHelper().ReadConfig <DeepWoodsSettings>() ?? new DeepWoodsSettings();
        }
        public static void DoLoad()
        {
            if (!Game1.IsMasterGame)
            {
                return;
            }

            ModEntry.Log("DeepWoodsSettings.DoLoad()", StardewModdingAPI.LogLevel.Trace);

            // load data
            DeepWoodsState = ModEntry.GetHelper().Data.ReadSaveData <DeepWoodsStateData>("data");
            if (DeepWoodsState == null)
            {
                // legacy file
                FileInfo legacyFile = new FileInfo($"{Constants.CurrentSavePath}/{SAVE_FILE_NAME}.json");
                ModEntry.Log("DeepWoodsSettings.DoLoad: Couldn't find savedata, trying legacy save: " + legacyFile.FullName, StardewModdingAPI.LogLevel.Trace);
                if (legacyFile.Exists)
                {
                    ModEntry.Log("DeepWoodsSettings.DoLoad: Loading legacy save.", StardewModdingAPI.LogLevel.Trace);
                    DeepWoodsState = JsonConvert.DeserializeObject <DeepWoodsStateData>(File.ReadAllText(legacyFile.FullName));
                }
            }
            if (DeepWoodsState == null)
            {
                ModEntry.Log("DeepWoodsSettings.DoLoad: No savedata, falling back to default.", StardewModdingAPI.LogLevel.Trace);
                DeepWoodsState = new DeepWoodsStateData();
            }

            // init settings
            ModEntry.Log("DeepWoodsSettings.DoLoad: Loading settings.", StardewModdingAPI.LogLevel.Trace);
            DeepWoodsSettings settings = ModEntry.GetHelper().ReadConfig <DeepWoodsSettings>();

            if (settings == null)
            {
                ModEntry.Log("Settings are null, using defaults.", StardewModdingAPI.LogLevel.Trace);
                Settings = new DeepWoodsSettings();
            }
            else
            {
                ModEntry.Log("Settings loaded successfully.", StardewModdingAPI.LogLevel.Trace);
                Settings = settings;

                if (Settings.WoodsPassage.AddBuildingTiles.Length == 0 &&
                    Settings.WoodsPassage.DeleteBuildingTiles.Length == 0 &&
                    Settings.WoodsPassage.WarpLocations.Length == 0)
                {
                    Settings.WoodsPassage = new WoodsPassageSettings();
                }
            }

            ModEntry.Log("DeepWoodsSettings.DoLoad: Done.", StardewModdingAPI.LogLevel.Trace);
        }