public static void ChestPreOpen(Chest self, PlayerController opener)
        {
            JammedChestBehav jamness = self.gameObject.GetComponent <JammedChestBehav>();

            if (jamness != null)
            {
                self.PredictContents(opener);
                if (UnityEngine.Random.value <= 0.5f)
                {
                    List <PickupObject> items = GenerateContents(self.lootTable, self.breakertronLootTable, opener, 0, new System.Random());
                    self.contents.AddRange(items);
                }
                else
                {
                    int          lootID = BraveUtility.RandomElement(LootIDs);
                    PickupObject obj    = PickupObjectDatabase.GetById(lootID);
                    self.contents.Add(obj);
                }
            }
            if (jamness != null)
            {
                SaveAPIManager.RegisterStatChange(CustomTrackedStats.JAMMED_CHESTS_OPENED, 1);
                LootEngine.SpawnCurrency(self.sprite.WorldCenter, UnityEngine.Random.Range(10, 21), false);
                if (UnityEngine.Random.value <= 0.25f && opener.name != "PlayerShade(Clone)")
                {
                    opener.healthHaver.ApplyDamage(1f, Vector2.zero, "Jammed Chest");
                }
            }
        }
        public static void PostProcessChest(Chest self)
        {
            JammedChestBehav         jammedMaybe   = self.gameObject.GetComponent <JammedChestBehav>();
            PassedOverForJammedChest unjammedMaybe = self.gameObject.GetComponent <PassedOverForJammedChest>();

            if (jammedMaybe == null && unjammedMaybe == null)
            {
                PlayerController TumblerPlayer = null;
                if (GameManager.Instance.PrimaryPlayer && GameManager.Instance.PrimaryPlayer.HasPickupID(CursedTumbler.CursedTumblerID))
                {
                    TumblerPlayer = GameManager.Instance.PrimaryPlayer;
                }
                else if (GameManager.Instance.SecondaryPlayer && GameManager.Instance.SecondaryPlayer.HasPickupID(CursedTumbler.CursedTumblerID))
                {
                    TumblerPlayer = GameManager.Instance.SecondaryPlayer;
                }

                if (AllJammedState.AllJammedActive || TumblerPlayer != null)
                {
                    float TumblerProc = 0;
                    float AlljamProc  = 0;
                    if (TumblerPlayer)
                    {
                        float localCurse = TumblerPlayer.stats.GetStatValue(PlayerStats.StatType.Curse);
                        TumblerProc = 0.25f;
                        if (localCurse >= 10)
                        {
                            TumblerProc = 1f;
                        }
                        else if (localCurse >= 9)
                        {
                            TumblerProc = 0.9f;
                        }
                        else if (localCurse >= 8)
                        {
                            TumblerProc = 0.8f;
                        }
                        else if (localCurse >= 7)
                        {
                            TumblerProc = 0.7f;
                        }
                        else if (localCurse >= 6)
                        {
                            TumblerProc = 0.6f;
                        }
                        else if (localCurse >= 5)
                        {
                            TumblerProc = 0.5f;
                        }
                        else if (localCurse >= 4)
                        {
                            TumblerProc = 0.4f;
                        }
                        else if (localCurse >= 3)
                        {
                            TumblerProc = 0.35f;
                        }
                        else if (localCurse >= 2)
                        {
                            TumblerProc = 0.3f;
                        }
                    }
                    if (AllJammedState.AllJammedActive)
                    {
                        int globalCurse = PlayerStats.GetTotalCurse();
                        if (globalCurse > 0)
                        {
                            AlljamProc = globalCurse * 0.1f;
                        }
                        else
                        {
                            AlljamProc = 0.1f;
                        }
                    }
                    float finalProc = AlljamProc + TumblerProc;
                    if (UnityEngine.Random.value <= finalProc)
                    {
                        JammedChestBehav jammo = self.gameObject.GetOrAddComponent <JammedChestBehav>();
                    }
                    else
                    {
                        self.gameObject.GetOrAddComponent <PassedOverForJammedChest>();
                    }
                }
            }
        }