Mob Essence Generator/ Chicken Farm

Discussion in 'Community Showcase' started by casilleroatr, Jul 2, 2013.

  1. casilleroatr

    casilleroatr New Member

    This is a cool chicken farm that I have been working on.

    (I am using Minecraft 1.5.2. The only mods that are required are Minefactory Reloaded and Buildcraft and possibly Computercraft. It also helps to have Thermal expansion for liquid and power transmission [ender storage is helpful too], railcraft might also be a good choice for storing the essence).

    I chose chickens because they can reproduce without having to feed them. This setup took awhile to set up but I am pretty sure that it will be maintenance free once set up.

    To sum it up, there is a holding pen of adult chickens. The floor in that pen is made entirely of hoppers (beware if you set this up yourself - young chicks appear to be able to escape through the hoppers). They lay eggs into the hoppers which then get pushed into a chest. An autarchic powered wooden gate (items in inventory -> energy pulsar) then pulls the eggs out and drops them on a conveyor which brings them into a vanilla dispenser which hatches the eggs. Hatched chicks then get transported to a 5*5 pen with a grinder in it. Items get sent to my AE network and sewage is turned to fertiliser and you get all that monster essence. The dispenser is run off of a computer craft timer. You can just as easily use the PLC, I only used a computer because I am not very experienced at using the PLC.

    The only input you need is power for the grinder (and the composter although you could void the sewage).

    Check the Spoiler Below for more information (and code for my computers) (Includes screenshots)

    EDIT: I didn't test my turtle properly before releasing this code. If anyone copies it, beware that it doesn't refuel itself properly. I will fix it when I get a chance.
    EDIT2: I have fixed the fuel problem and changed the code below. However, I then realised that the program will also fail if you turn off the game while it is mid cycle. I have read other programs that save there current progress or use GPS but I am not good enough to do that yet and now I am going to use a chronotyper to remove the adults and convey them up to another grinder that I have set up that has an item collector hooked up to it.

    2013-07-02_06.10.39.png

    Here is the setup as a whole. The holding pen is up at the right there and you can see the path that the eggs go to enter the structure on the left. There is an MFR Item Router that puts the incoming eggs down into the dispenser that is pulsed by the computer you can clearly see (notice the rednet cable suspending the conveyor belt).

    2013-07-02_06.10.48.png

    This just shows how eggs are conveyed onto the belt.

    2013-07-02_06.11.07.png

    There is the dispenser (the rednet cable is below the conveyor). It drops the eggs onto another conveyor belt.

    2013-07-02_06.11.31.png

    I use this conveyor belt because I don't want eggs to be hitting the chicks. However, I needed to do something else because in ordinary conditions the chicks would work against the belt until they grow up.

    2013-07-02_06.11.34.png

    This adult chicken tricks the chicks into going down the conveyor belt. Upon hatching, chicks will attempt to stay near their parents or any other adult chicken. In my testing I found that if there were no adults it would attempt to stay where it was hatched. That is why this chicken must be here. Its eggs go through a hopper into an ender chest.

    2013-07-02_06.11.52.png

    Here is the the chick pen. They are killed when they grow up. Unfortunately the Grinder doesn't seem to be working properly and it isn't picking everything up. That is why I have that turtle in the corner who is programmed to sweep up once a minute.

    I wrote two programs for this farm. Here they are behind this spoiler

    This is the turtle Code

    Code:
    --ChickenBot
     
    function penClear()
        function aboutTurnLeft()
            turtle.turnLeft()
            turtle.forward()
            turtle.suck()
            turtle.turnLeft()
        end
     
        function aboutTurnRight()
            turtle.turnRight()
            turtle.forward()
            turtle.suck()
            turtle.turnRight()
        end
     
        function penRun()
            for i = 1,4 do
                turtle.suckDown()
                turtle.forward()
                turtle.suckDown()
            end
        end
     
        function reset()
            turtle.turnRight()
            for i = 1,4 do
                turtle.forward()
            end
            turtle.turnRight()
            for i = 1,5 do
                turtle.forward()
            end
            for i = 1,16 do
                turtle.select(i)
                turtle.drop()
            end
            turtle.turnRight()
            turtle.turnRight()
        end
     
        turtle.forward()
        for i = 1,5 do
            penRun()
            if i == 1 then
                aboutTurnLeft()
            elseif i == 3 then
                aboutTurnLeft()
            elseif i == 2 then
                aboutTurnRight()
            elseif i == 4 then
            aboutTurnRight()
            end
        end
        reset()
    end
     
    function refuel()
        turtle.turnRight()
        turtle.turnRight()
        turtle.select(1) --This was where I made the mistake. In the first version turtle.select and turtle.suck were
        turtle.suck() --the other way round meaning the turtle pulled the coal into the wrong slot and didn't use it
        turtle.refuel(64)
        turtle.turnRight()
        turtle.turnRight()
    end
     
    function checkFuel()
        local fuelLevel = turtle.getFuelLevel()
        if fuelLevel <1000 then
            refuel()
        end 
    end
     
    while true do
        term.setCursorPos(1,1)
        term.clear()
        print("Initiating Sequence")
        checkFuel()
        penClear()
    sleep(60)
    end
     
    
    This is the timer (you can disable it although the eggs will eventually pile up).

    --As I was writing this I added a small improvement. Turning the Dispenser timer off will now also turn off the wooden pipe from extracting. I upgraded the autarchic gate to a gold AND autarchic gate.

    Code:
    --aniFarmer
     
    local ioSwitch = redstone.getInput("right")
     
    print("EggDispenser")
     
    while true do
        if ioSwitch == true then
            redstone.getOutput("back", 4)
            print("Dispenser: On")
            redstone.setBundledOutput("back", 6)
            sleep(0.5)
            redstone.setBundledOutput("back", 4)
            sleep(9.5)
        else
            redstone.setBundledOutput("back", 0)
            print("Dispenser: Off")
            sleep(10)
        end
        ioSwitch = redstone.getInput("right")
        term.setCursorPos(1,3)
        term.clearLine()
    end
     

    Attached Files:

    PhilHibbs and Saice like this.
  2. Golrith

    Golrith Over-Achiever Trusted User

    Very nice. So the grinder can be set to work only on adults? I really like what you can do with animal farms in MFR.
     
  3. casilleroatr

    casilleroatr New Member

    The grinder only works on adults straight out of the box. It is quite smart about doing its job. You can also use chronotypers to seperate babies and adults. Yeah, MFR is cool especially for the animal farms. And there is something wonderfully grim about conveying the chickens on those belts to the slaughter pen (does saying that make me a bad person? I hope not.
     
    PhantomRage likes this.

Share This Page