internal static void Generate(bool isLoadingCustomContent)
        {
            // Fetch initial area-bundle values if not yet set
            if (Bundles.DefaultMaxArea == 0)
            {
                var bundleData = Game1.content.Load
                                 <Dictionary <string, string> >
                                     (@"Data/Bundles");

                // Area count is inclusive of Abandoned Joja Mart area to avoid conflicting logic and cases
                Bundles.DefaultMaxArea = bundleData.Keys
                                         .Select(key => key.Split(Bundles.BundleKeyDelim).First())
                                         .Distinct()
                                         .Count() - 1;

                // Bundle count is inclusive of Abandoned Joja Mart bundles, as each requires a unique ID
                Bundles.DefaultMaxBundle = bundleData.Keys
                                           .Select(key => key.Split(Bundles.BundleKeyDelim).Last())
                                           .ToList()
                                           .ConvertAll(int.Parse)
                                           .Max();

                // Starting index for our custom bundles' unique IDs is after the highest base game bundle ID
                Bundles.CustomBundleInitialIndex = Bundles.DefaultMaxBundle + 1;

                // Starting index for our custom areas' numbers is after the Abandoned Joja Mart area
                // The game will usually consider area 7 as the bulletin board extras, and area 8 as the Junimo Hut, so skip those too
                // Skip 9 to bring us up to a round 10, leaving room for 1 new base game area.
                Bundles.CustomAreaInitialIndex = 10;
            }

            // Reassign world state with or without custom values
            Random r = new ((int)Game1.uniqueIDForThisGame * 9);             // copied from StardewValley.Game1.GenerateBundles(...)

            if (isLoadingCustomContent)
            {
                Helper.Content.InvalidateCache(CustomCommunityCentre.AssetManager.BundleCacheAssetKey);           // Farmhand idiocy
                Dictionary <string, string> bundleData = new StardewValley.BundleGenerator().Generate(
                    bundle_data_path: CustomCommunityCentre.AssetManager.BundleCacheAssetKey,                     // Internal sneaky asset business
                    rng: r);

                // Add bundle data entries, ignoring existing values for mod compatibility
                Dictionary <string, string> oldBundleData = Game1.netWorldState.Value.BundleData;
                bundleData = oldBundleData
                             .Union(bundleData.Where(pair => !oldBundleData.ContainsKey(pair.Key)))
                             .ToDictionary(pair => pair.Key, pair => pair.Value);

                // Reassign bundle data
                Game1.netWorldState.Value.SetBundleData(bundleData);
            }
            else
            {
                if (Context.IsMainPlayer && Bundles.CustomAreaBundleKeys != null)
                {
                    var netBundleData = Reflection.GetField
                                        <NetStringDictionary <string, NetString> >
                                            (obj: Game1.netWorldState.Value, name: "netBundleData")
                                        .GetValue();

                    IEnumerable <int> bundleNumbers = Bundles.GetAllCustomBundleNumbers();

                    foreach (int bundleNumber in bundleNumbers.Where(num => Bundles.IsCustomBundle(num)))
                    {
                        netBundleData.Remove(netBundleData.Keys
                                             .FirstOrDefault(b => bundleNumber == int.Parse(b.Split(Bundles.BundleKeyDelim).Last())));
                        Game1.netWorldState.Value.Bundles.Remove(bundleNumber);
                        Game1.netWorldState.Value.BundleRewards.Remove(bundleNumber);
                    }
                }
            }
        }