1
Counting entities using /testfor
Hi,
So I came up with an easy solution for counting entities.
Here's how:
/testfor @e[x,y,z,r,type=Villager]
/stats block ~ ~ ~ set Successcount Count Village1
I have two of those on my Server, one works fine, the other one (completely identical) stopped working for some reason. It shows way too few villagers and for some reason doesn't work for cows or sheep in my village.
The Problem first accured when I was too far away from my village and parts of it unloaded while the commandblock started counting. It showed way too few villagers, which I thought was fine, because he couldn't test for them if they were unloaded
When I returned and the commandblock counted again, it still showed to few Villagers, even with all of them loaded. So now one counter works (for another village) and one doesn't.
It tends to output:"that entity cannot be found"... but only sometimes
So I came up with an easy solution for counting entities.
Here's how:
/testfor @e[x,y,z,r,type=Villager]
/stats block ~ ~ ~ set Successcount Count Village1
I have two of those on my Server, one works fine, the other one (completely identical) stopped working for some reason. It shows way too few villagers and for some reason doesn't work for cows or sheep in my village.
The Problem first accured when I was too far away from my village and parts of it unloaded while the commandblock started counting. It showed way too few villagers, which I thought was fine, because he couldn't test for them if they were unloaded
When I returned and the commandblock counted again, it still showed to few Villagers, even with all of them loaded. So now one counter works (for another village) and one doesn't.
It tends to output:"that entity cannot be found"... but only sometimes
Create an account or sign in to comment.
2
1
what`s the matter?
1
are you kidding me? -.-
/testfor @e[x=(Cords),y=(Cords),z=(Cords),Type=Villager