From 962377bd7e76e3929a85f50dae821d40002aeea9 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 4 Mar 2022 21:48:38 +0000 Subject: bug fixes and polish --- src/lib/minecraft/inventory.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/minecraft/inventory.ts') diff --git a/src/lib/minecraft/inventory.ts b/src/lib/minecraft/inventory.ts index 1990648..72d72ee 100644 --- a/src/lib/minecraft/inventory.ts +++ b/src/lib/minecraft/inventory.ts @@ -3,7 +3,7 @@ import vanilla from 'skyblock-assets/matchers/vanilla.json' import packshq from 'skyblock-assets/matchers/vanilla.json' import furfsky_reborn from 'skyblock-assets/matchers/furfsky_reborn.json' -interface Item { +export interface Item { id?: string count?: number vanillaId: string @@ -57,8 +57,8 @@ export function itemToUrl(item: Item, packName?: string): string { return textureUrl } -export function skyblockItemToUrl(skyblockItemName: string) { - const item = skyblockItemNameToItem(skyblockItemName) +export function skyblockItemToUrl(skyblockItem: string | Item) { + const item: Item = typeof skyblockItem === 'string' ? skyblockItemNameToItem(skyblockItem) : skyblockItem const itemTextureUrl = itemToUrl(item, 'packshq') return itemTextureUrl } -- cgit