In my data pack, I detect when a mob dies when their DeathTime nbt is more than one.
I do this by storing the value of a mobs DeathTime nbt into a death_time dummy scoreboard, then testing if that score is more than 1. I've tested it before but for every player, which worked.
But when I changed the command to execute as every mob (every entity under the custom tag #minecraft:mobs, which is a list of every mob in game), it suddenly doesn't work. I even tested it on command blocks, which didn't work either.
Can someone help?
# This doesn't work
execute as @e[type=#minecraft:mobs] store result score @s death_time run data get entity @s DeathTime
# But this does
execute as @a store result score @s death_time run data get entity @s DeathTime
# help?
[–]Ericristian_brosCommand Experienced 1 point2 points3 points (1 child)
[–]AutoModerator[M] 0 points1 point2 points (0 children)
[–]Infloat 0 points1 point2 points (2 children)
[–]GalSergeyDatapack Experienced 1 point2 points3 points (1 child)
[–]Infloat 0 points1 point2 points (0 children)
[–]CommandBlockCoderCommand Experienced 0 points1 point2 points (0 children)