Jump to content

Mob detection switch help


Magicthize
 Share

Recommended Posts

I'm trying to refine my slaughterhouse so that I don't generate the overcrowding that is the big problem with my existing setup. Currently 2 animals are kept in a 5x5 pen with access to a breeder. Once they breed the babies are moved to a 2nd pen. Here they grow up naturally before being slaughtered. The issue I'm having is that the growth process takes alot longer than the breeding process so inevitably I end up with an overcrowded growth pen. I'd like to be able to switch off the breeder when there are more than, for example, 5 mobs in the growth pen but I can't figure out a way to do it reliably.

Link to comment
Share on other sites

I tried to think up an ad-hoc solution to this, and here's what I came up with:

There are 3 pens - one for breeding, one for children, and one for grown up children. There is a know amount of adults in the breeding pen, say 8. One round of breeding will therefore produce 4 children. These children will be transferred to a second pen, BUT! Behind the prototyper, there is a pressure plate. Once the animal is transferred to the other side, it triggers that pressure plate, which will activate a piston to push it off the plate (you can use cows, which are more than 1.5 blocks tall) and down into the second pen, which is 2 blocks below the pressure plate (so that cows cannot walk/jump back onto the plate).

Now, this same pressure plate is connected to either a PRC or a computer, which will have a counter of sorts. Once it counts to 4 (4 children have passed the system), it knows that all the adults in the first pen have bred and produced children. Thus, it sends a redstone signal to the Breeder, shutting it down.

The 4 children in the second pen eventually grow up, and get chronotyped into the third pen, with the exact same counting system. This system does the opposite of what the previous one does, and re-enables the Breeder once all 4 children have grown up, been transferred and slaughtered.

Link to comment
Share on other sites

I'm not sure, but couldn't you use something like ComputerCraft and OpenCCSensors to detect how many animals there are, then turn the Breeder off once the count hits 5 or something?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...