private void ContainerRecyclingTriggered() { var player = Player.m_localPlayer; var container = (Container)AccessTools.Field(typeof(InventoryGui), "m_currentContainer") .GetValue(InventoryGui.instance); if (container == null) { return; } Log.LogDebug($"Player {player.GetPlayerName()} triggered recycling"); Recycler.RecycleInventoryForAllRecipes(container.GetInventory(), player); }