diff --git a/package-lock.json b/package-lock.json index 4f1f9faf..82250f36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,8 @@ "@mcschema/java-1.18": "^0.3.8", "@mcschema/java-1.18.2": "^0.1.17", "@mcschema/java-1.19": "^0.1.41", - "@mcschema/locales": "^0.1.72", + "@mcschema/java-1.19.3": "^0.0.3", + "@mcschema/locales": "^0.1.73", "@zip.js/zip.js": "^2.4.5", "brace": "^0.11.1", "buffer": "^6.0.3", @@ -569,10 +570,18 @@ "@mcschema/core": "^0.12.37" } }, + "node_modules/@mcschema/java-1.19.3": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@mcschema/java-1.19.3/-/java-1.19.3-0.0.3.tgz", + "integrity": "sha512-Lp0MfvjQ2wbEc3xxnJKi3zWy3gzKwYEZ1iHZi/SyCFjPPVqHE6AGifYOz4P2sIWkQrIn5e6aqFfTyCld6BA2KQ==", + "dependencies": { + "@mcschema/core": "^0.12.37" + } + }, "node_modules/@mcschema/locales": { - "version": "0.1.72", - "resolved": "https://registry.npmjs.org/@mcschema/locales/-/locales-0.1.72.tgz", - "integrity": "sha512-G4CNNM3VNLL17cvRT6cBWOkQhaQcmiFtmBcg8X/8fE3K5qPr6P2VIG6UwICVnnvuZhG50ijSbdsd68zd93u7XA==" + "version": "0.1.73", + "resolved": "https://registry.npmjs.org/@mcschema/locales/-/locales-0.1.73.tgz", + "integrity": "sha512-N6vxZtW3ZoWmj7KkwvFSPMaXY6QyCB2qbeZKECXSCr9EFsERr05AI/RAIzD6/LVauIJTT92oYkNQDqAmbn1upA==" }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", @@ -5636,10 +5645,18 @@ "@mcschema/core": "^0.12.37" } }, + "@mcschema/java-1.19.3": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@mcschema/java-1.19.3/-/java-1.19.3-0.0.3.tgz", + "integrity": "sha512-Lp0MfvjQ2wbEc3xxnJKi3zWy3gzKwYEZ1iHZi/SyCFjPPVqHE6AGifYOz4P2sIWkQrIn5e6aqFfTyCld6BA2KQ==", + "requires": { + "@mcschema/core": "^0.12.37" + } + }, "@mcschema/locales": { - "version": "0.1.72", - "resolved": "https://registry.npmjs.org/@mcschema/locales/-/locales-0.1.72.tgz", - "integrity": "sha512-G4CNNM3VNLL17cvRT6cBWOkQhaQcmiFtmBcg8X/8fE3K5qPr6P2VIG6UwICVnnvuZhG50ijSbdsd68zd93u7XA==" + "version": "0.1.73", + "resolved": "https://registry.npmjs.org/@mcschema/locales/-/locales-0.1.73.tgz", + "integrity": "sha512-N6vxZtW3ZoWmj7KkwvFSPMaXY6QyCB2qbeZKECXSCr9EFsERr05AI/RAIzD6/LVauIJTT92oYkNQDqAmbn1upA==" }, "@nodelib/fs.scandir": { "version": "2.1.5", diff --git a/package.json b/package.json index 3dff8189..e877c738 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "@mcschema/java-1.18": "^0.3.8", "@mcschema/java-1.18.2": "^0.1.17", "@mcschema/java-1.19": "^0.1.41", - "@mcschema/locales": "^0.1.72", + "@mcschema/java-1.19.3": "^0.0.3", + "@mcschema/locales": "^0.1.73", "@zip.js/zip.js": "^2.4.5", "brace": "^0.11.1", "buffer": "^6.0.3", diff --git a/src/app/services/DataFetcher.ts b/src/app/services/DataFetcher.ts index 6775e6da..4f4e04f9 100644 --- a/src/app/services/DataFetcher.ts +++ b/src/app/services/DataFetcher.ts @@ -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(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)}`) diff --git a/src/app/services/Schemas.ts b/src/app/services/Schemas.ts index 8a4b6f9c..106229cf 100644 --- a/src/app/services/Schemas.ts +++ b/src/app/services/Schemas.ts @@ -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 diff --git a/src/config.json b/src/config.json index f0599a50..ae36542f 100644 --- a/src/config.json +++ b/src/config.json @@ -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", diff --git a/src/locales/en.json b/src/locales/en.json index 30d2ef86..7dc0d3a5 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -5,6 +5,7 @@ "advancement": "Advancement", "any_version": "Any", "assets": "Assets", + "atlas": "Atlas", "back": "Back", "block_definition": "Blockstate", "changelog": "Technical changelog",