diff options
author | mat <github@matdoes.dev> | 2022-07-01 00:42:08 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-07-01 00:42:08 -0500 |
commit | 0358ff2db613a494b377a33b55eb798d44dba6c2 (patch) | |
tree | 42c857e896e07c45572dbc70b9c0670fa3264d4e /src/lib/minecraft/inventory.ts | |
parent | dc95635f199e86072ad7fa7fc7a5d77457120715 (diff) | |
parent | 713f35b2dcb033898ecf1477b6d2cf895d37aac3 (diff) | |
download | skyblock-stats-0358ff2db613a494b377a33b55eb798d44dba6c2.tar.gz skyblock-stats-0358ff2db613a494b377a33b55eb798d44dba6c2.tar.bz2 skyblock-stats-0358ff2db613a494b377a33b55eb798d44dba6c2.zip |
Merge branch 'faster-heads'
Diffstat (limited to 'src/lib/minecraft/inventory.ts')
-rw-r--r-- | src/lib/minecraft/inventory.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/minecraft/inventory.ts b/src/lib/minecraft/inventory.ts index 9599c35..42ce6a7 100644 --- a/src/lib/minecraft/inventory.ts +++ b/src/lib/minecraft/inventory.ts @@ -104,7 +104,7 @@ let itemUrlCache: Record<string, string> = {} setInterval(() => { itemUrlCache = {} }, 120 * 1000) -export function itemToUrl(item: Item, pack?: skyblockAssets.MatcherFile, headSize?: number): string { +export function itemToUrl(item: Item, pack?: skyblockAssets.MatcherFile): string { const itemNbt: skyblockAssets.NBT = { display: { Name: item.display?.name @@ -129,8 +129,6 @@ export function itemToUrl(item: Item, pack?: skyblockAssets.MatcherFile, headSiz }) if (textureUrl === null) { textureUrl = `https://h.matdoes.dev/3d/${item.headTexture}` - if (headSize) - textureUrl += `/${headSize}` } } else { textureUrl = skyblockAssets.getTextureUrl({ @@ -143,9 +141,9 @@ export function itemToUrl(item: Item, pack?: skyblockAssets.MatcherFile, headSiz return textureUrl } -export function skyblockItemToUrl(skyblockItem: string | Item, pack?: skyblockAssets.MatcherFile, headSize?: number) { +export function skyblockItemToUrl(skyblockItem: string | Item, pack?: skyblockAssets.MatcherFile) { const item = typeof skyblockItem === 'string' ? skyblockItemNameToItem(skyblockItem) : skyblockItem - const itemTextureUrl = itemToUrl(item, pack, headSize) + const itemTextureUrl = itemToUrl(item, pack) return itemTextureUrl } |