Right now I spawn entity when a block is placed with this script:
BlockEvents.placed('mm:test_animated_computer', event => {
let myEntity = event.block.createEntity("minecraft:armor_stand")
myEntity.x+=0.5
myEntity.y+=0
myEntity.z+=0.5
myEntity.mergeNbt('{NoGravity:true,Small:true}')
myEntity.spawn()
})
I want the spawned entity to have a name, but running it with
myEntity.mergeNbt('{NoGravity:true,Small:true,CustomName:'"name"'}')
returns an error probably because the right formating for custom name nbt, which is ' "name" ' conflicts with the mergeNBT. Is there any other way to change custom name of the summoned entity?