static Sprite GetSprite(PLFBRecipeModule recipeModule)
        {
            if (recipeModule == null)
            {
                throw new Exception("Module Null");
            }
            string inpath = recipeModule.IconResourcePath;

            if (inpath == string.Empty)
            {
                int subtypeformodded = recipeModule.SubType - FBRecipeModuleModManager.Instance.VanillaFBRecipeModuleMaxType;
                if (subtypeformodded > -1 && subtypeformodded < FBRecipeModuleModManager.Instance.FBRecipeModuleTypes.Count)
                {
                    return(FBRecipeModuleModManager.Instance.FBRecipeModuleTypes[subtypeformodded].OvenIcon);
                }
                throw new Exception("PulsarModLoader.Content.FBModuleModManager.RecipeDisplayIconPatch - Recipe Module not found");
            }
            return(Resources.Load <Sprite>(inpath));
        }
        static int[] PatchMethod(PLFluffyOven instance)
        {
            PLFBRecipeModule module = instance.CurrentProducingModule;

            if (module.GetBiscuitTypeToProduce() == EFoodType.MAX)
            {
                int subtypeformodded = module.SubType - FBRecipeModuleModManager.Instance.VanillaFBRecipeModuleMaxType;
                if (subtypeformodded > -1 && subtypeformodded < FBRecipeModuleModManager.Instance.FBRecipeModuleTypes.Count)
                {
                    return(FBRecipeModuleModManager.Instance.FBRecipeModuleTypes[subtypeformodded].ItemTypeToProduce);
                }
                else
                {
                    throw new Exception("PulsarModLoader.Content.FBModuleModManager.ServerTakeBiscuitPatch - Foodtype max with no module found");
                }
            }
            else
            {
                return(new int[] { 5, (int)module.GetBiscuitTypeToProduce() });
            }
        }
        public static PLFBRecipeModule CreateFBRecipeModule(int Subtype, int level)
        {
            PLFBRecipeModule InFBRecipeModule;

            if (Subtype >= Instance.VanillaFBRecipeModuleMaxType)
            {
                InFBRecipeModule = new PLFBRecipeModule(FBRecipe.E_MAX, level);
                int subtypeformodded = Subtype - Instance.VanillaFBRecipeModuleMaxType;
                Logger.Info($"Subtype for modded is {subtypeformodded}");
                if (subtypeformodded <= Instance.FBRecipeModuleTypes.Count && subtypeformodded > -1)
                {
                    Logger.Info("Creating FBModule from list info");
                    FBRecipeModuleMod FBRecipeModuleType = Instance.FBRecipeModuleTypes[Subtype - Instance.VanillaFBRecipeModuleMaxType];
                    InFBRecipeModule.SubType                        = Subtype;
                    InFBRecipeModule.Name                           = FBRecipeModuleType.Name;
                    InFBRecipeModule.Desc                           = FBRecipeModuleType.Description;
                    InFBRecipeModule.m_IconTexture                  = FBRecipeModuleType.IconTexture;
                    InFBRecipeModule.m_MarketPrice                  = FBRecipeModuleType.MarketPrice;
                    InFBRecipeModule.CargoVisualPrefabID            = FBRecipeModuleType.CargoVisualID;
                    InFBRecipeModule.CanBeDroppedOnShipDeath        = FBRecipeModuleType.CanBeDroppedOnShipDeath;
                    InFBRecipeModule.Experimental                   = FBRecipeModuleType.Experimental;
                    InFBRecipeModule.Unstable                       = FBRecipeModuleType.Unstable;
                    InFBRecipeModule.Contraband                     = FBRecipeModuleType.Contraband;
                    InFBRecipeModule.Price_LevelMultiplierExponent  = FBRecipeModuleType.Price_LevelMultiplierExponent;
                    InFBRecipeModule.CookDurationMs                 = FBRecipeModuleType.CookDurationMs;
                    InFBRecipeModule.CookedTimingOffsetMidpoint     = FBRecipeModuleType.CookedTimingOffsetMidpoint;
                    InFBRecipeModule.PerfectlyCookedMaxTimingOffset = FBRecipeModuleType.PerfectlyCookedMaxTimingOffset;
                    InFBRecipeModule.CookedMaxTimingOffset          = FBRecipeModuleType.CookedMaxTimingOffset;
                    InFBRecipeModule.FoodSupplyCost                 = FBRecipeModuleType.FoodSupplyCost;
                    InFBRecipeModule.BiscuitTypeToProduce           = EFoodType.MAX;
                    InFBRecipeModule.IconResourcePath               = string.Empty;
                }
            }
            else
            {
                InFBRecipeModule = new PLFBRecipeModule((FBRecipe)Subtype, level);
            }
            return(InFBRecipeModule);
        }