From 16020174399206da22026faf427fc45f18d383bd Mon Sep 17 00:00:00 2001 From: Jochen Jacobs Date: Wed, 20 Sep 2023 22:09:49 +0200 Subject: [PATCH] fix structure tag loading --- src/stores/useDatapackStore.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stores/useDatapackStore.ts b/src/stores/useDatapackStore.ts index 7adde00..38a8f9d 100644 --- a/src/stores/useDatapackStore.ts +++ b/src/stores/useDatapackStore.ts @@ -82,11 +82,11 @@ export const useDatapackStore = defineStore('datapacks', () => { promises.push(registerType("worldgen/structure_set", StructureSet.REGISTRY, StructureSet.fromJson)) promises.push(registerType("worldgen/template_pool", StructureTemplatePool.REGISTRY, StructureTemplatePool.fromJson)) promises.push(registerType("structures", Structure.REGISTRY, (arrayBuffer) => () => Structure.fromNbt(NbtFile.read(new Uint8Array(arrayBuffer)).root))) - promises.push(registerTag("tags/worldgen/structure", WorldgenStructure.REGISTRY)) - promises.push(registerType("worldgen/biome", WorldgenRegistries.BIOME, () => {return {}})) promises.push(new Promise(async (resolve) => { + await registerType("worldgen/biome", WorldgenRegistries.BIOME, () => {return {}}) await registerTag("tags/worldgen/biome", WorldgenRegistries.BIOME) - registerType("worldgen/structure", WorldgenStructure.REGISTRY, WorldgenStructure.fromJson) + await registerType("worldgen/structure", WorldgenStructure.REGISTRY, WorldgenStructure.fromJson) + await registerTag("tags/worldgen/structure", WorldgenStructure.REGISTRY) resolve() })) await Promise.all(promises)