Cooked meat is named as the best all-around food in Minecraft. If you want to have meat readily available, you must farm animals. Aside from that, farming animals also provides some other useful items such as wool, eggs, feathers, and leathers. In addition, a manual slaughter farm is also able to provide a fair bit of experience.
Most of the automated animal farms include a killing mechanism, a cooking mechanism for the meat and an item collector, usually a hopper. Apparently, the cooking mechanism and killing mechanism are combined, in the form of lava or fire.
For the sake of demonstrating an example, this article consists of the tutorial of automatic cow farms by graham0987654321.
Step 1: The Cow Pen
In order to start, you make a 12×10 1 block high square made of any kind of block. On the 12 block side, you need to break the second and the fifth block. On top of the blocks, please place fence pieces so the cows cannot get out. On top of those fence pieces, place another row of blocks that will prevent specific mobs from entering the cage.
Step 2: The Rails
When you are done making a cage, you can continue the process by placing the rails in the pattern. Then, add mob spawners inside the pen and spawn cows in it.
Step 3: Working the Rails
In step 3, add a switch station if you want to have multiple farms. Now, create a rail line to where your house will be. You are able to use the director rails and powered the rails for more dependable service.
Step 4: Farming Station
Now, it is time for you to make the farming station. You need to make a 5×5 3 block deep hole and start filling it with hoppers. In order to place the hoppers, you will need to crouch down using the crouch button located in the middle of the direction controls.
Then, walk away from where you started following the pattern, and then place the rails and the netherrack in the pattern.
Step 5: Farm House
In the step 5, you have to build your house on the top of the farming part. Where the minecart enters the farm, please have a 1×1 hole so the other 1×2 mobs cannot enter. The next thing that you have to do is to finish the rails going from the house to the spawner. After that, light the netherrack with the flint and steel and send minecarts from your house down the rails. First, the cart goes down the rail. Second, the cart enters the spawners and gets a cow. Third, the cart exits the spawner with a cow and goes down the rail to the farm. Fourth, the cow and the cart enter the farm and the fire breaks the cart and the cow gets cooked. Fifth, the cows drop (cooked beef and leather) and fall into the hopper and get fed into the first hopper.