I'm looking for a way to count how many adult villagers I have in a confined space, and then activate a redstone signal when a quota is reached. My first thought was to detect how many beds have been slept in, but babies sleep in the beds as well. I then thought there must be a way to detect when a workstation has been claimed, but my tests show that neither observers nor comparators can accomplish this. This must be achievable in survival mode, so no command blocks.
Sorry for the late reply, but the only way I can think of is to separate the babies and adults, put the adults in a 1 block enclosure with a golden weighted pressure plate. The gold weighted pressure plate increases its Redstone output by 1 for every entity with a max signal strength of 15. If you want to separate the adults and babies just have a gap on the bottom blocks so babies can get through but adults can't.
Note: Be careful of maxEntityCramming if you decide to use this method
I'm looking for a way to count how many adult villagers I have in a confined space, and then activate a redstone signal when a quota is reached. My first thought was to detect how many beds have been slept in, but babies sleep in the beds as well. I then thought there must be a way to detect when a workstation has been claimed, but my tests show that neither observers nor comparators can accomplish this. This must be achievable in survival mode, so no command blocks.
Sorry for the late reply, but the only way I can think of is to separate the babies and adults, put the adults in a 1 block enclosure with a golden weighted pressure plate. The gold weighted pressure plate increases its Redstone output by 1 for every entity with a max signal strength of 15. If you want to separate the adults and babies just have a gap on the bottom blocks so babies can get through but adults can't.
Note: Be careful of maxEntityCramming if you decide to use this method