Skip to content

Commit

Permalink
update deepslate
Browse files Browse the repository at this point in the history
improve errors on registerType
  • Loading branch information
jacobsjo committed Dec 23, 2024
1 parent dbf4860 commit e5f23d2
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 16 deletions.
49 changes: 37 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/vue-fontawesome": "^3.0.3",
"@vueuse/components": "^10.2.0",
"deepslate": "https://github.com/jacobsjo/deepslate.git#dimension-padding-built",
"deepslate": "^0.23.4",
"idb-keyval": "^6.2.1",
"leaflet": "^1.9.4",
"mc-datapack-loader": "0.5.0",
"mc-datapack-loader": "0.5.1",
"pinia": "^2.1.4",
"vue": "^3.3.4",
"vue-i18n": "^9.2.2",
Expand Down
8 changes: 6 additions & 2 deletions src/stores/useDatapackStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,13 @@ export const useDatapackStore = defineStore('datapacks', () => {
await Promise.all((await composite_datapack.getIds(location)).map(id => new Promise<void>(async (resolve) => {
try {
const data = await composite_datapack.get(location, id)
registry.register(id, loader(data, id))
try {
registry.register(id, loader(data, id))
} catch (e) {
console.warn(`Failed to register ${location.location}: ${id.toString()}: ${e}`)
}
} catch (e) {
console.warn(`Failed to load ${location}: ${id.toString()}: ${e}`)
console.warn(`Failed to load ${location.location}: ${id.toString()}: ${e}`)
}
resolve()
})))
Expand Down

0 comments on commit e5f23d2

Please sign in to comment.