mojira.dev
MC-86089

The data tag @e {Health:Xs} isnt finding mobs with that health

Put the summary of the bug you're having here
I built a command block thing in a test world that displayed a mobs health above their head, how ever in the snapshot when using it, it didn't display the health. I've checked all other parts of the system and they work, and it did work in 15w31c.
What I expected to happen was...:
Describe what you thought should happen here
it should have set all mobs of a certain health to a score corresponding to the health, then using /entitydata change their name to Health:X, X being whatever their health was
What actually happened was...:
Describe what happened here
The command blocks that set the score of mobs with certain health always has "The dataTag does not match for (the mobs UUID)" even though I have it so it checks every health value between 0 and 40 and all of them say it. When I manualy set the score of a mob the command blocks that change the name of the mob work fine.
Steps to Reproduce:
1. Make a rapidly pulsing redstone clock
2. run the command "/scoreboard objectives add healthbar dummy" to set up the scoreboard
3. to the clock add command blocks with the command "/scoreboard players set @e healthbar 20 {Health:20s}" (This is where I believe the problem is) but have a command block for every value at least between 20 and 10
4.Also add to the clock command blocks with the command "/entitydata @e[score_healthbar_min=20,score_healthbar=20] {CustomName:"Health:20"}" again with a command block for every value between at least 20 and 10
5.spawn a mob that by default has a health within the range of values made in steps 3 and 4. In an older version it should display the health of the mob as its name and punching or hitting it with a weapon should cause the number to drop, in 15w33b it won't.
6.For more info on the device this video: https://www.youtube.com/watch?v=bUfYmBUbmfc by Dragnoz explains how to make it in more detail, I'm using a modified version of his design

Comments 1

Derek Burlingame

(Unassigned)

Unconfirmed

Minecraft 15w33b

Retrieved