MC1271 Entity Sensor enhancement: Counting the number of entities
LadyCailinBot opened this issue ยท 11 comments
CRAFTBOOK-2480 - Reported by pmpmpm
Hi!
Well, that's the first time I put "Major" for an enhancement, but this one could really be amazing.
Actually, the 1271 works in a very simple binary way: Is there [Entity](or entity(or entity...)) in this space/region?
Yes: Outputs high
No: Outputs low
What about adjusting this result with the actual number of searched entities in the region? Here is how would the new fourth line work:
(Ancient: ) List of entity
(New: ) List of entity <==> #
Rather than long explanations, here is an example:
p => 5
Outputs high if there is at least 5 players in the area of detection
ph == 9
Outputs high if (number of players) + (number of hostile mobs) = 9 in the area of detection
p < 4
Outputs high if there is 3 or less players in the area of detection
So, that's all. It would be really incredible, since nothing on CraftBook allows you to know exactly how many players there is in an area!
Thanks for reading, and I hope it's possible.
Comment by pmpmpm
Works well, but when trying to set a strictly > 10, the IC outputs high even if there's exactly 10 zombies.
Edit: Actually, whatever I put on the sign, it outputs high if there a number of zombies >= to the minimum.
Comment by pmpmpm
Tried with 2035. Now all 1271 fourth line work as if I put "==" instead of what I did really put (If I write ZOMBIE>5, the IC will output low as soon as there's 6 zombies or more).