mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-27 08:48:46 +00:00
Add blockstate and model previews
This commit is contained in:
@@ -167,12 +167,13 @@ export async function fetchResources(versionId: VersionId) {
|
||||
const version = config.versions.find(v => v.id === versionId)!
|
||||
await validateCache(version)
|
||||
try {
|
||||
const [models, uvMapping, atlas] = await Promise.all([
|
||||
const [blockDefinitions, models, uvMapping, atlas] = await Promise.all([
|
||||
fetchAllPresets(versionId, 'block_definition'),
|
||||
fetchAllPresets(versionId, 'model'),
|
||||
fetch(`${mcmeta(version, 'atlas')}/all/data.min.json`).then(r => r.json()),
|
||||
loadImage(`${mcmeta(version, 'atlas')}/all/atlas.png`),
|
||||
])
|
||||
return { models, uvMapping, atlas }
|
||||
return { blockDefinitions, models, uvMapping, atlas }
|
||||
} catch (e) {
|
||||
throw new Error(`Error occured while fetching resources: ${message(e)}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user