@@ -3,7 +3,7 @@ import { SvelteDialog } from '../util/svelteDialog'
33import { Valuable } from '../util/stores'
44import BlueprintSettingsDialogSvelteComponent from '../components/blueprintSettingsDialog.svelte'
55import { toSafeFuntionName } from '../util/minecraftUtil'
6- import { defaultValues } from '../blueprintSettings'
6+ import { defaultValues , ExportMode } from '../blueprintSettings'
77import { translate } from '../util/translation'
88import { updateBoundingBox } from '../blueprintFormat'
99
@@ -29,8 +29,10 @@ function getSettings() {
2929 }
3030 return toSafeFuntionName ( value )
3131 } ) ,
32- resourcePackExportMode : new Valuable ( Project ! . animated_java . resource_pack_export_mode ) ,
33- dataPackExportMode : new Valuable ( Project ! . animated_java . data_pack_export_mode ) ,
32+ resourcePackExportMode : new Valuable (
33+ Project ! . animated_java . resource_pack_export_mode as string
34+ ) ,
35+ dataPackExportMode : new Valuable ( Project ! . animated_java . data_pack_export_mode as string ) ,
3436 // Resource Pack Settings
3537 displayItem : new Valuable ( Project ! . animated_java . display_item , value => {
3638 if ( ! value ) {
@@ -75,8 +77,9 @@ function setSettings(settings: ReturnType<typeof getSettings>) {
7577 Project . animated_java . enable_plugin_mode = settings . enablePluginMode . get ( )
7678 Project . pluginMode . set ( settings . enablePluginMode . get ( ) ) // Required to update the project title.
7779 Project . animated_java . export_namespace = settings . exportNamespace . get ( )
78- Project . animated_java . resource_pack_export_mode = settings . resourcePackExportMode . get ( )
79- Project . animated_java . data_pack_export_mode = settings . dataPackExportMode . get ( )
80+ Project . animated_java . resource_pack_export_mode =
81+ settings . resourcePackExportMode . get ( ) as ExportMode
82+ Project . animated_java . data_pack_export_mode = settings . dataPackExportMode . get ( ) as ExportMode
8083 // Resource Pack Settings
8184 Project . animated_java . display_item = settings . displayItem . get ( )
8285 Project . animated_java . custom_model_data_offset = settings . customModelDataOffset . get ( )
@@ -109,8 +112,8 @@ export function openBlueprintSettingsDialog() {
109112 id : `${ PACKAGE . name } :blueprintSettingsDialog` ,
110113 title : translate ( 'dialog.blueprint_settings.title' ) ,
111114 width : 512 ,
112- svelteComponent : BlueprintSettingsDialogSvelteComponent ,
113- svelteComponentProperties : settings ,
115+ component : BlueprintSettingsDialogSvelteComponent ,
116+ props : settings ,
114117 preventKeybinds : true ,
115118 onConfirm ( ) {
116119 setSettings ( settings )
0 commit comments