mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-27 00:38:46 +00:00
Show item textures for loot table entries
This commit is contained in:
@@ -154,6 +154,11 @@ export async function fetchVersions(): Promise<VersionMeta[]> {
|
||||
}
|
||||
}
|
||||
|
||||
export function getTextureUrl(versionId: VersionId, path: string): string {
|
||||
const version = config.versions.find(v => v.id === versionId)!
|
||||
return `${mcmeta(version, 'assets')}/assets/minecraft/textures/${path}.png`
|
||||
}
|
||||
|
||||
async function getData<T = any>(url: string, fn: (v: any) => T = (v: any) => v): Promise<T> {
|
||||
try {
|
||||
const cache = await caches.open(CACHE_NAME)
|
||||
|
||||
Reference in New Issue
Block a user