From a12f0eaf3349160282bdc9f48cf9f253a154e500 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sun, 14 Feb 2021 12:03:01 -0600 Subject: add visited zones --- src/cleaners/skyblock/inventory.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cleaners/skyblock/inventory.ts') diff --git a/src/cleaners/skyblock/inventory.ts b/src/cleaners/skyblock/inventory.ts index 1b49e95..96cd629 100644 --- a/src/cleaners/skyblock/inventory.ts +++ b/src/cleaners/skyblock/inventory.ts @@ -27,7 +27,9 @@ interface Item { export type Inventory = Item[] function cleanItem(rawItem): Item { - const vanillaId: number = rawItem.id + // if the item doesn't have an id, it isn't an item + if (rawItem.id === undefined) return null + const vanillaId: number = rawItem.id && -1 const itemCount = rawItem.Count const damageValue = rawItem.Damage const itemTag = rawItem.tag -- cgit