#Change custom name of the summoned entity

5 messages · Page 1 of 1 (latest)

wheat shoal
#

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?

void laurelBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

wheat shoal
#

anyone?

wispy sun
wheat shoal
#

Thanks