mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-24 23:56:51 +00:00
@@ -92,7 +92,7 @@ export async function fetchPreset(versionId: VersionId, registry: string, id: st
|
||||
if (id.startsWith('immersive_weathering:')) {
|
||||
url = `https://raw.githubusercontent.com/AstralOrdana/Immersive-Weathering/main/src/main/resources/data/immersive_weathering/block_growths/${id.slice(21)}.json`
|
||||
} else {
|
||||
const type = ['blockstates', 'models', 'font'].includes(registry) ? 'assets' : 'data'
|
||||
const type = ['atlases', 'blockstates', 'models', 'font'].includes(registry) ? 'assets' : 'data'
|
||||
url = `${mcmeta(version, type)}/${type}/minecraft/${registry}/${id}.json`
|
||||
}
|
||||
const res = await fetch(url)
|
||||
@@ -107,7 +107,7 @@ export async function fetchAllPresets(versionId: VersionId, registry: string) {
|
||||
const version = config.versions.find(v => v.id === versionId)!
|
||||
await validateCache(version)
|
||||
try {
|
||||
const type = ['block_definition', 'model', 'font'].includes(registry) ? 'assets' : 'data'
|
||||
const type = ['atlas', 'block_definition', 'model', 'font'].includes(registry) ? 'assets' : 'data'
|
||||
return new Map<string, unknown>(Object.entries(await cachedFetch(`${mcmeta(version, 'summary')}/${type}/${registry}/data.min.json`)))
|
||||
} catch (e) {
|
||||
throw new Error(`Error occurred while fetching all ${registry} presets: ${message(e)}`)
|
||||
|
||||
@@ -5,7 +5,7 @@ import { initPartners } from '../partners/index.js'
|
||||
import { message } from '../Utils.js'
|
||||
import { fetchData } from './DataFetcher.js'
|
||||
|
||||
export const VersionIds = ['1.15', '1.16', '1.17', '1.18', '1.18.2', '1.19'] as const
|
||||
export const VersionIds = ['1.15', '1.16', '1.17', '1.18', '1.18.2', '1.19', '1.19.3'] as const
|
||||
export type VersionId = typeof VersionIds[number]
|
||||
|
||||
export const DEFAULT_VERSION: VersionId = '1.19'
|
||||
@@ -46,6 +46,7 @@ const versionGetter: {
|
||||
1.18: () => import('@mcschema/java-1.18'),
|
||||
'1.18.2': () => import('@mcschema/java-1.18.2'),
|
||||
1.19: () => import('@mcschema/java-1.19'),
|
||||
'1.19.3': () => import('@mcschema/java-1.19.3'),
|
||||
}
|
||||
|
||||
export let CachedDecorator: INode<any>
|
||||
|
||||
@@ -83,6 +83,11 @@
|
||||
},
|
||||
{
|
||||
"id": "1.19",
|
||||
"ref": "1.19.2",
|
||||
"pack_format": 10
|
||||
},
|
||||
{
|
||||
"id": "1.19.3",
|
||||
"dynamic": true,
|
||||
"pack_format": 10
|
||||
}
|
||||
@@ -331,6 +336,14 @@
|
||||
"schema": "font",
|
||||
"minVersion": "1.16"
|
||||
},
|
||||
{
|
||||
"id": "atlas",
|
||||
"url": "assets/atlas",
|
||||
"path": "atlases",
|
||||
"tags": ["assets"],
|
||||
"schema": "atlas",
|
||||
"minVersion": "1.19.3"
|
||||
},
|
||||
{
|
||||
"id": "block_growth",
|
||||
"url": "partners/immersive-weathering/block-growth",
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"advancement": "Advancement",
|
||||
"any_version": "Any",
|
||||
"assets": "Assets",
|
||||
"atlas": "Atlas",
|
||||
"back": "Back",
|
||||
"block_definition": "Blockstate",
|
||||
"changelog": "Technical changelog",
|
||||
|
||||
Reference in New Issue
Block a user