mojira.dev
MC-178297

Custom Health/Max Health

If you want to summon a mob with a custom amount of health:

/summon minecraft:zombie ~ ~ ~ {Health:700f,Attributes:[{Name:generic.maxHealth,Base:700}]}

the zombie will not be given 700 health, it will only be given its normal max health of 20 (you can see this by using /data get entity @e[type=zombie,limit=1] Health.

I have this command: "/data merge entity @e[type=zombie,limit=1] {Health:700f,Attributes:[{generic.maxHealth,Base:700}]} in a repeating command block to constantly update its health but it stays at 20.

I tried the same set-up in 1.15.2 and it worked and using the "/data get" command above the zombie had 700 health, but in 20w15a it would max at 20.

Linked issues

Comments 1

Josh I

(Unassigned)

Unconfirmed

(Unassigned)

20w15a

Retrieved