mojira.dev
MC-87821

Testfor a mobs health doesn't work ?

So I'm trying to detect the health of a ghast, but it ain't working? I summon in the ghast using: {Health:500,Attributes:[{Name:generic.maxHealth,Base:500.0d}]}

But when I do the /testfor @e[type=Ghast] {Health:500s} it doesn't work?

"[16:03:55] Ghast did not match the required data structure"

Am I missing out on some change, or maybe I'm just dumb.

Comments 3

Health contains a float value, so with f instead of s it should work

Are you sure that /testfor @e[type=Ghast] {Health:500f} does not work?

Alfred Jäärf

(Unassigned)

Unconfirmed

Minecraft 15w35e

Retrieved