Open kubson3824 opened 3 years ago
Issue fixed, turns out it was a Magic Storage problem
This happens when a recursive recipe with more than Recipe.maxRequirements
(default 15) ingredients is viewed, which in turn causes maxRequirements
to be increased.
Due to RecipeBrowser using maxRequirements
, this causes an IndexOutOfRange Exception.
Actually there is an other way to solve this instead of changing all the maxRequirements to ingredient.Length, it's to make a break when an item.type == ItemID.None like vanilla does. But Recipe Browser continues instead, which is a bit inefficient and have unexpected consequences like this bug
Without ingredient.Length, the selected (compound) recipe's ingredients would get truncated to 15 items causing long compound recipes to not have all ingredients listed in the recipe browser UI
I'm using RecursiveCraft, Magic Storage Extra and Recipe Browser, after I exit the Magic Storage Crafting Interface and try to check a recipe in Recipe Browser, I get this:
[14:16:27] [1/ERROR] [Terraria]: System.IndexOutOfRangeException: Index was outside the bounds of the array. at RecipeBrowser.RecipeCatalogueUI.SetRecipe(Int32 index) in RecipeBrowser\RecipeCatalogueUI.cs:line 747 at RecipeBrowser.UIElements.UIRecipeSlot.Click(UIMouseEvent evt) in RecipeBrowser\UIElements\UIRecipeSlot.cs:line 67 at Terraria.UI.UserInterface.Update(GameTime time) at Terraria.ModLoader.ModHooks.UpdateUI(GameTime gameTime) at Terraria.Main.DoUpdate(GameTime gameTime) at DMD<Terraria.Main::Update>(Main , GameTime )
Using mods:
[ "AlchemistNPC", "AutoTrash", "Azercadmium", "CalamityMod", "CalValEX", "ElementsAwoken", "Fargowiltas", "FargowiltasSouls", "Luiafk", "MagicStorageExtra", "MaxStackExtra", "Polarities", "RecipeBrowser", "Redemption", "SacredTools", "SpiritMod", "Split", "StarsAbove", "SubworldLibrary", "VeinMiner", "WingSlot", "FKBossHealthBar", "BossChecklist", "imkSushisMod", "imkSushisModAddOn", "WMITF", "Laugicality", "WebmilioCommons", "SOTS", "FargowiltasSoulsDLC", "RecursiveCraft" ]