Minecraft – How to detect the presence of flowing lava

minecraft-java-editionminecraft-redstone

In vanilla and updated (1.11 as of now) Minecraft I would like to detect the presence of flowing lava in a block (or area for that matter) and output a corresponding redstone signal. Basically what I want to do is close a door whenever lava is behind it and leave it open when there is no lava. I can work with the actual lava block being not necessarily the one next to the door (as the redstone should be hidden anyway), since it is coming in flowing from above and I can split and reroute it a little.

So the first thing I thought about was the observer block. I wanted to place an observer block next to a lava flow channel (or its end for that matter) and route the pulse into a simple T-flip-flop which would thus toggle whenever the presence of flowing lava behind the observer changes.

This idea seems to work fine when the lava arrives, as soon as the lava flow reaches the observer, it pulses once. However, for the leaving lava it doesn't seem to work, since whenever a lava flow block anywhere in the continuous stream changes its state (i.e. retracts) the observer pulses, which messes up the T-flip-flop.

Is there any way to make this work, either with the observer block or any other way? I would like to keep this as simple as possible since I don't want to invest too much into what ends up to be a little gimmick and I'd also try to stay away from unreliable detection means or mods to my Minecraft.

Best Answer

Try this (sorry about the background)

enter image description here

It uses an observer at every block the flow will touch, and merges / prolongs their output into one signal.

The signal produced is almost exclusively on if there's any lava, or off if there's none, because of the varying repeater delays at the end.

No T flip-flop is used; it acts like a lever.

Sometimes it glitches / the door flashes open or closed while lava is being added or removed, but that is very brief and uncommon.