[Lookup Anything] Error in Crab Pot Item Query
lycc193 opened this issue ยท 1 comments
[Lookup Anything] Something went wrong looking that up:System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Pathoschild.Stardew.LookupAnything.DataParser.GetFishSpawnRules(ParsedItemData fish, Metadata metadata) in E:\source\_Stardew\Mods.Pathoschild\LookupAnything\DataParser.cs:line 169
Someone in a Nexus post also mentioned this issue but didn't provide a log.
My friend reproduced the issue, and I roughly investigated the cause.
In Data/Fish, the data for crab pot-related items such as "720": "Shrimp/trap/.2/681 .35/ocean/1/3/false",
The relevant line in DataParser.GetFishSpawnRules has an abnormal value retrieval, which leads to an IndexOutOfRange exception in subsequent iterations.
ArgUtility.Get(fishFields, 5)?.Split(' ')
for (int i = 0, last = timeFields.Length + 1; i + 1 < last; i += 2)