LocalPlayer.Items returns Items only (not ObjectItems when appropriate).
Sample code below:
int count = @event.LocalPlayer.Items.Count;
Console.WriteLine(" Count: " + count);
for (int i=0; i< count; i++)
{
Item item = @event.LocalPlayer.Items[i];
Console.WriteLine(" Item: " + item + " : " + (item==null?"<null>":item.GetType().ToString()));
if (item is ObjectItem)
{
ObjectItem o = (ObjectItem)item;
Console.WriteLine(" obj: " + o.Name);
}
}
What this should return is a list of Items that are also (sometimes) ObjectItems. Instead, I get this:
Count: 12
Item: Storm.StardewValley.Wrapper.Item : Storm.StardewValley.Wrapper.Item
Item: Storm.StardewValley.Wrapper.Item : Storm.StardewValley.Wrapper.Item
...etc.
If I check the "Underlying" type, I get the right type (e.g., StardewValley.Object), but it would be better if the Wrapper type had the appropriate inheritance chain set.