diff --git a/src/formats/blueprint/codec.ts b/src/formats/blueprint/codec.ts index 7401d470..fc07e69e 100644 --- a/src/formats/blueprint/codec.ts +++ b/src/formats/blueprint/codec.ts @@ -38,12 +38,17 @@ export const BLUEPRINT_CODEC = registerDeletableHandlerPatch({ setupProject(format, model.meta?.uuid) if (!Project) throw new Error('Failed to load Animated Java Blueprint') - this.parse!(model, file.path) - const name = pathToName(file.path, true) + Project.name = pathToName(name, false) if (file.path && isApp && !file.no_file) { - Project.name = pathToName(file.path, false) Project.save_path = file.path + } + + // Match Blockbench's project codec lifecycle for integrations that observe project loads. + Blockbench.dispatchEvent('load_project', { model, path: file.path }) + this.parse!(model, file.path) + + if (file.path && isApp && !file.no_file) { addRecentProject({ name, path: file.path,