mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-27 00:38:46 +00:00
Add loot table preview (#293)
* Initial loot table preview + item display counts * Add loot functions without NBT * Add loot conditions * Render item tooltips with name and lore components * Remove debug text component * Disable advanced tooltips in the tree * Minor style fixes * Add item slot overlay and tweak tooltip offset * Fix some items not rendering * Translate item names and text components * Translate params + more functions and tooltips * Add durability bar * Configurable stack mixing * Correct tooltip background and border * Add enchanting * Enchantment glint * Configurable luck, daytime and weather * Improve tooltip spacing * More tooltip spacing improvements * Remove debug logging
This commit is contained in:
@@ -204,6 +204,16 @@ async function loadImage(src: string) {
|
||||
}
|
||||
*/
|
||||
|
||||
export async function fetchLanguage(versionId: VersionId, lang: string = 'en_us') {
|
||||
const version = config.versions.find(v => v.id === versionId)!
|
||||
await validateCache(version)
|
||||
try {
|
||||
return await cachedFetch<Record<string, string>>(`${mcmeta(version, 'assets')}/assets/minecraft/lang/${lang}.json`)
|
||||
} catch (e) {
|
||||
throw new Error(`Error occured while fetching language: ${message(e)}`)
|
||||
}
|
||||
}
|
||||
|
||||
export interface Change {
|
||||
group: string,
|
||||
version: string,
|
||||
|
||||
Reference in New Issue
Block a user