How can you cook a cow with a dispenser and lava?
Solution 1:
Invisible parts: Under each orange block is a sticky piston facing up. The left black-framed block is a furnace with 14 items in it (acting as a signal source), and the right black-framed block is the dispenser with a lava bucket.
How it works: The input signal comes from the left. The orange block and sticky piston turn the signal into a pulse (a “monostable”, or rising-edge detector) for the dispenser. The right comparator's signal indicates the decreased fullness of the dispenser (empty buckets stack more than full ones), allowing the torch to turn on, which signals the right monostable to produce a second pulse to remove the lava. If a longer burning-in-lava time is desired, lengthen the repeater delay on the right.
It would be possible to simply produce two pulses from the input by delaying the monostable signal; the advantage of this design is that it is self-correcting if the lava is in the wrong state, because the second lava-removing pulse is generated by the dispensing of the lava. However, doing it the other way does have the advantage of needing no quartz.
This design is derived from my zombie damager, which is a continuous flow system. If you want to have this machine automatically trigger when mobs arrive in it, you could add a tripwire above the lava in the same way as that mechanism does. (The main wiring here is different from there because that machine removes the lava, rather than adding it, when a mob arrives, but the tripwire can be connected to the input in the same way.)
Finally, note that chickens are tricky because they have so little health. Specifically, even with a different pulse circuit built for absolute minimum delay, chickens standing where the lava goes seem to take enough damage to die instantly, burning their items in the lava. However, if the chicken is on a slab underneath the lava (thus being slightly lower), then it sometimes survives long enough to die after the lava disappears, and its drops will sometimes survive even if it dies instantly. (Strange that that makes a difference.) Based on this result, I recommend using something other than lava for chickens.
Tested in Minecraft 1.6.2.
Solution 2:
Here's my suggestion:
- Detect animal presence with pressure plate or trip wire
- Change constant on into a single pulse (about 2-4 ticks)
- Change pulse into two rapid pulses.
These can be done using two edge detectors and an AND gate.
An Edge detector is basically a NOR gate with both inputs coming from the same line but one with a delay. You can NOR the output with the source line to get an edge detector that only activates when the source turns on. Finally take the output from the NOR gate to the second edge detector. The output from the second edge detector will be two rapid pulses.
Adjust the timing on the first edge detector to increase the time between the pulses. The timing of the second edge detector will adjust the length of the pulses.
I'm not very good at compacting circuits but that's the basic logic behind what you'd want to do.
Edge Detector <- used in my design.
Here's my rough design.