You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -312,7 +312,7 @@ function updateModelTo1_0pre1(model: any) {
312
312
if(typeofnode==='string')return
313
313
bones.push(node.uuidasstring)
314
314
node.configs={
315
-
default: newBoneConfig().toJSON(),
315
+
default: newDisplayEntityConfig().toJSON(),
316
316
variants: {},
317
317
}
318
318
node.children.forEach((child: any)=>{
@@ -625,6 +625,33 @@ function updateModelTo1_8_0(model: any) {
625
625
deletedisplay.backgroundAlpha
626
626
}
627
627
}
628
+
// Update old config structure for display entities
629
+
constdisplayEntities=fixed.elements.filter(
630
+
e=>
631
+
e.type===AnimatedJava.TextDisplay.type||
632
+
e.type===AnimatedJava.VanillaItemDisplay.type||
633
+
e.type===AnimatedJava.VanillaBlockDisplay.type
634
+
)
635
+
for(constdisplayEntityofdisplayEntities){
636
+
if(displayEntity.config){
637
+
if(displayEntity.config.custom_name!==undefined){
638
+
displayEntity.config.on_apply_function??=''
639
+
displayEntity.config.on_apply_function+=`\n# Auto-upgraded custom name setting (May need fixing):\ndata modify entity @s CustomName set value '${displayEntity.config.custom_name}'\n`
640
+
deletedisplayEntity.config.custom_name
641
+
}
642
+
if(displayEntity.config.custom_name_visible){
643
+
displayEntity.config.on_apply_function??=''
644
+
displayEntity.config.on_apply_function+=`\n# Auto-upgraded custom name visibility setting:\ndata modify entity @s CustomNameVisible set value ${displayEntity.config.custom_name_visible}\n`
645
+
deletedisplayEntity.config.custom_name_visible
646
+
}
647
+
648
+
displayEntity.configs={
649
+
default: displayEntity.config,
650
+
variants: {},
651
+
}
652
+
deletedisplayEntity.config
653
+
}
654
+
}
628
655
// Update locators to use new event function names
0 commit comments