diff options
author | mat <github@matdoes.dev> | 2022-03-21 16:12:29 +0000 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-03-21 16:12:29 +0000 |
commit | dcd928a36b12857f4782394f085a1b4ae9d8a6a0 (patch) | |
tree | 6b03a34bb1b1468974dd9722e66967946a8e7a99 /src/lib/minecraft/inventory.ts | |
parent | f7cfcaad044abcc7d64ca7dda31086d2c26a4e48 (diff) | |
download | skyblock-stats-dcd928a36b12857f4782394f085a1b4ae9d8a6a0.tar.gz skyblock-stats-dcd928a36b12857f4782394f085a1b4ae9d8a6a0.tar.bz2 skyblock-stats-dcd928a36b12857f4782394f085a1b4ae9d8a6a0.zip |
fix heads
Diffstat (limited to 'src/lib/minecraft/inventory.ts')
-rw-r--r-- | src/lib/minecraft/inventory.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/minecraft/inventory.ts b/src/lib/minecraft/inventory.ts index 7bd06fc..5d648ae 100644 --- a/src/lib/minecraft/inventory.ts +++ b/src/lib/minecraft/inventory.ts @@ -18,7 +18,7 @@ export interface Item { timestamp?: string enchantments?: { [name: string]: number } - head_texture?: string + headTexture?: string } const INVENTORIES = { @@ -45,7 +45,7 @@ export function itemToUrl(item: Item, pack?: skyblockAssets.MatcherFile): string }, } let textureUrl: string - if (item.head_texture) { + if (item.headTexture) { // if it's a head, try without vanilla and if it fails just use the mc-heads url textureUrl = skyblockAssets.getTextureUrl({ id: item.vanillaId, @@ -54,7 +54,7 @@ export function itemToUrl(item: Item, pack?: skyblockAssets.MatcherFile): string noNullTexture: true }) if (textureUrl === null) - textureUrl = `https://mc-heads.net/head/${item.head_texture}` + textureUrl = `https://mc-heads.net/head/${item.headTexture}` } else textureUrl = skyblockAssets.getTextureUrl({ id: item.vanillaId, @@ -103,7 +103,7 @@ const skyblockItems: { [itemName: string]: Item } = { spruce_log: { vanillaId: 'minecraft:log:1' }, gemstone: { vanillaId: 'minecraft:skull', - head_texture: '39b6e047d3b2bca85e8cc49e5480f9774d8a0eafe6dfa9559530590283715142' + headTexture: '39b6e047d3b2bca85e8cc49e5480f9774d8a0eafe6dfa9559530590283715142' }, hard_stone: { vanillaId: 'minecraft:stone' }, }
\ No newline at end of file |