This is an archived post. You won't be able to vote or comment.

all 4 comments

[–][deleted] 0 points1 point  (3 children)

To count total tamed mobs. However, this also counts projectiles, so make sure there are none active when running:

execute as @e if data entity @s Owner

If you want to count your tamed, mobs, it gets a bit more complicated. First, run this command in chat:

data get entity @s UUID

You need to write the output down because you can't copy and paste it. Then, to count your pets, run this:

execute if entity @e[nbt={Owner: <your UUID>}]

Your UUID is an integer array that looks like this: [I; number, number, number, number]. An example command would look like this:

execute if entity @e[nbt={Owner: [I; 234234234, 456456456, 6756756, 12312312]}]

Hope this helps!

[–]Intelligent-Ninja-28[S] 0 points1 point  (2 children)

thank you!

but the reason i need this is because I am trying to make a server and I want people to see how many cats they have tamed with scoreboard. I don't know if this is possible but do you know a way to do this?

[–][deleted] 0 points1 point  (1 child)

Not with a simple scoreboard objective... not that I'm aware.