mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-27 16:58:46 +00:00
Support 1.18 (experimental) snapshots (#158)
* Half support 1.18-experimental-snapshot-1 * Fetch 1.18 presets and improve rendering of lists * Noise preview with deepslate * Biome preview with deepslate * Generalize canvas logic in one hook * Simplify useCanvas * Use mcschema for 1.18 * Improve noise settings preview controls * Fix build * Update deepslate and improve preview caching * Cleanup, remove old preview code * Couple seed between model and preview * Limit output to improve performance + copy feedback For the vanilla overworld dimension (200K lines), it took 2+ seconds to write the output to the textarea Now capped at 10K chars * Add surface_relative_threshold to decorator preview * Improve fixed list errors
This commit is contained in:
@@ -155,10 +155,11 @@ async function fetchDynamicRegistries(version: Version, target: CollectionRegist
|
||||
}
|
||||
|
||||
export async function fetchPreset(version: VersionId, registry: string, id: string) {
|
||||
console.debug(`[fetchPreset] ${id} ${registry} ${id}`)
|
||||
console.debug(`[fetchPreset] ${registry} ${id}`)
|
||||
const versionData = config.versions.find(v => v.id === version)!
|
||||
try {
|
||||
const res = await fetch(`${vanillaDatapackUrl}/${versionData.refs.vanilla_datapack_data}/data/minecraft/${registry}/${id}.json`)
|
||||
const url = `${vanillaDatapackUrl}/${versionData.refs.vanilla_datapack_data}/data/minecraft/${registry}/${id}.json`
|
||||
const res = await fetch(url)
|
||||
return await res.json()
|
||||
} catch (e) {
|
||||
console.warn(`Error occurred while fetching ${registry} preset ${id}:`, message(e))
|
||||
|
||||
Reference in New Issue
Block a user