@@ -41,6 +41,8 @@ export function process(model: any): any {
4141 if ( compareVersions ( '0.5.5' , model . meta . format_version ) ) model = updateModelTo1_0pre6 ( model )
4242 // v1.0.0-pre7
4343 if ( compareVersions ( '0.5.6' , model . meta . format_version ) ) model = updateModelTo1_0pre7 ( model )
44+ // v1.0.0-pre8
45+ if ( compareVersions ( '0.5.7' , model . meta . format_version ) ) model = updateModelTo1_0pre8 ( model )
4446
4547 console . groupEnd ( )
4648
@@ -210,7 +212,7 @@ function updateModelTo1_0pre1(model: any) {
210212 uuid : model . meta . uuid || guid ( ) ,
211213 last_used_export_namespace : model . animated_java . settings . project_namespace ,
212214 } ,
213- project_settings : {
215+ blueprint_settings : {
214216 // Blueprint Settings
215217 show_bounding_box : defaultSettings . show_bounding_box ,
216218 auto_bounding_box : defaultSettings . auto_bounding_box ,
@@ -437,7 +439,7 @@ function updateModelTo1_0pre1(model: any) {
437439 nbt . delete ( 'Tags' )
438440 if ( [ ...nbt . keys ( ) ] . length !== 0 ) commands . push ( 'data merge entity @s ' + nbt . toString ( ) )
439441 if ( tags ) commands . push ( ...tags . map ( t => `tag @s add ${ t } ` ) )
440- blueprint . project_settings ! . summon_commands = commands . join ( '\n' )
442+ blueprint . blueprint_settings ! . summon_commands = commands . join ( '\n' )
441443 }
442444
443445 console . log ( 'Finished Blueprint:' , blueprint )
@@ -477,19 +479,32 @@ function updateModelTo1_0pre6(model: any): IBlueprintFormatJSON {
477479function updateModelTo1_0pre7 ( model : any ) : IBlueprintFormatJSON {
478480 console . log ( 'Processing model format 1.0.0-pre7' , JSON . parse ( JSON . stringify ( model ) ) )
479481
480- if ( model . blueprint_settings . enable_resource_pack !== undefined ) {
481- model . blueprint_settings . resource_pack_export_mode = model . blueprint_settings
482+ if ( model . project_settings . enable_resource_pack !== undefined ) {
483+ model . project_settings . resource_pack_export_mode = model . project_settings
482484 . enable_resource_pack
483485 ? 'raw'
484486 : 'none'
485- delete model . blueprint_settings . enable_resource_pack
487+ delete model . project_settings . enable_resource_pack
486488 }
487489
488- if ( model . blueprint_settings . enable_data_pack !== undefined ) {
489- model . blueprint_settings . data_pack_export_mode = model . blueprint_settings . enable_data_pack
490+ if ( model . project_settings . enable_data_pack !== undefined ) {
491+ model . project_settings . data_pack_export_mode = model . project_settings . enable_data_pack
490492 ? 'raw'
491493 : 'none'
492- delete model . blueprint_settings . enable_data_pack
494+ delete model . project_settings . enable_data_pack
495+ }
496+
497+ return model as IBlueprintFormatJSON
498+ }
499+
500+ // region v1.0.0-pre8
501+ // eslint-disable-next-line @typescript-eslint/naming-convention
502+ function updateModelTo1_0pre8 ( model : any ) : IBlueprintFormatJSON {
503+ console . log ( 'Processing model format 1.0.0-pre8' , JSON . parse ( JSON . stringify ( model ) ) )
504+
505+ if ( model . project_settings ) {
506+ model . blueprint_settings = model . project_settings
507+ delete model . project_settings
493508 }
494509
495510 return model as IBlueprintFormatJSON
0 commit comments