private static void FixPlando(object item, object location)
            {
                var castedItem     = (Item)item;
                var castedLocation = (Location)location;

                if (castedLocation.pool == Location.LocationPool.Grub)
                {
                    OnGrubLocation?.Invoke(castedLocation.sceneName);
                }

                PlayerData pd = PlayerData.instance;

                Item.GiveAction action = castedItem.action;

                switch (action)
                {
                case Item.GiveAction.WanderersJournal:
                    pd.SetInt(nameof(pd.trinket1), pd.trinket1);
                    break;

                case Item.GiveAction.HallownestSeal:
                    pd.SetInt(nameof(pd.trinket2), pd.trinket2);
                    break;

                case Item.GiveAction.KingsIdol:
                    pd.SetInt(nameof(pd.trinket3), pd.trinket3);
                    break;

                case Item.GiveAction.ArcaneEgg:
                    pd.SetInt(nameof(pd.trinket4), pd.trinket4);
                    break;

                case Item.GiveAction.Grub:
                    if (OnGrubObtain?.Invoke() ?? true)
                    {
                        pd.SetInt(nameof(pd.grubsCollected), pd.grubsCollected);
                    }
                    break;

                case Item.GiveAction.Kingsoul:
                    pd.SetBool(nameof(pd.gotCharm_36), true);
                    break;
                }
            }
            public static void FixRando
            (
                Action <GiveItemActions.GiveAction, string, string, int> orig,
                GiveItemActions.GiveAction action,
                string item,
                string location,
                int geo
            )
            {
                orig(action, item, location, geo); // This is a call to the originally hooked method to make it run. If you don't do this the original method will never run, which is something BingoUI does not want (but you might)

                // Below this it's mostly things not related to hooking but to BingoUI execution so comments won't be as in-depth.

                // Obtain the reqDef, which is how Rando manages which pool objects belong to. This is used for Grub locations in our case

                Type logicManager = Type.GetType("RandomizerMod.Randomization.LogicManager, RandomizerMod3.0");

                MethodInfo getItemDef = logicManager?.GetMethod("GetItemDef");

                if (getItemDef == null)
                {
                    return;
                }

                object reqDef = null;

                try
                {
                    reqDef = getItemDef.Invoke(null, new object[] { location }); // Shops are made to throw so catch it if it's a shop
                }
                catch (TargetInvocationException e)
                {
                    // If it's not a shop, re-throw.
                    if (!(e.InnerException is KeyNotFoundException))
                    {
                        BingoUI.Log($"Inner exception was not KeyNotFoundException, instead was {e.InnerException}");

                        throw;
                    }
                }

                string pool = (string)reqDef?.GetType().GetField("pool").GetValue(reqDef);  // Finally obtain the pool

                if (pool == "Grub")
                {
                    OnGrubLocation?.Invoke(location);
                }

                // This part is the one that checks what rando assigned then runs SetInt or SetBool so that other mods catch on
                // Literally just let rando do its thing and increment or whatever, then call SetInt with the same value so the hooked things run
                PlayerData pd = PlayerData.instance;

                switch (action)
                {
                case GiveItemActions.GiveAction.WanderersJournal:
                    pd.SetInt(nameof(pd.trinket1), pd.trinket1);
                    break;

                case GiveItemActions.GiveAction.HallownestSeal:
                    pd.SetInt(nameof(pd.trinket2), pd.trinket2);
                    break;

                case GiveItemActions.GiveAction.KingsIdol:
                    pd.SetInt(nameof(pd.trinket3), pd.trinket3);
                    break;

                case GiveItemActions.GiveAction.ArcaneEgg:
                    pd.SetInt(nameof(pd.trinket4), pd.trinket4);
                    break;

                case GiveItemActions.GiveAction.Grub:
                    if (OnGrubObtain?.Invoke() ?? true)
                    {
                        pd.SetInt(nameof(pd.grubsCollected), pd.grubsCollected);
                    }
                    break;

                case GiveItemActions.GiveAction.Kingsoul:
                    pd.SetBool(nameof(pd.gotCharm_36), true);
                    break;
                }
            }