File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -613,8 +613,8 @@ function updateModelTo1_8_0(model: any) {
613613 delete fixed . blueprint_settings . target_minecraft_versions
614614 }
615615
616- // Update text display backgrounds to use 8 digit hex colors instead of separate alpha
617616 if ( Array . isArray ( fixed . elements ) ) {
617+ // Update text display backgrounds to use 8 digit hex colors instead of separate alpha
618618 const textDisplays = fixed . elements . filter ( e => e . type === TextDisplay . type )
619619 for ( const display of textDisplays ) {
620620 if ( display . backgroundAlpha !== undefined ) {
@@ -625,6 +625,18 @@ function updateModelTo1_8_0(model: any) {
625625 delete display . backgroundAlpha
626626 }
627627 }
628+ // Update locators to use new event function names
629+ const locators = fixed . elements . filter ( e => e . type === Locator . prototype . type )
630+ for ( const locator of locators ) {
631+ if ( locator . config ?. summon_commands ) {
632+ locator . config . on_summon_function = locator . config . summon_commands
633+ delete locator . config . summon_commands
634+ }
635+ if ( locator . config ?. ticking_commands ) {
636+ locator . config . on_tick_function = locator . config . ticking_commands
637+ delete locator . config . ticking_commands
638+ }
639+ }
628640 }
629641
630642 return fixed
You can’t perform that action at this time.
0 commit comments