#Add extra attributes when summoning a mob

10 messages · Page 1 of 1 (latest)

trim dew
#

Hi,
can I summon a mob with extra arguments like this: /summon minecraft:zombie ~ ~ ~ {NoAI:1,Rotation:[0f,0f]} using this code (there are methods/properties?):

let mobEntity = entity.block.createEntity('minecraft:zombie')
mobEntity.addTag('spawner_mob')
mobEntity.x = x
mobEntity.y = y
mobEntity.z = z
mobEntity.spawn()

Thanks in advance.

worthy valveBOT
#

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

quick mural
#
mobEntity.mergeNbt({
  NoAI:1,
  Rotation:[0f,0f]
})```
#

also, there's ```js
.setPosition(x, y, z)

trim dew
#

Thanks for the reply to the second post too. Now I try.

#

That works fine, thanks.

#

If I want to add a button on a mob head there is a method?

quick mural
#

no

trim dew
#

Ah, ok... thanks for all.

quick mural