I have tons of two-lever implication gates in a map I'm making, and in some cases there isn't enough space to place it. The gate, a bit expanded for simplicity, looks like this:

does anyone ever enter image description here?

This setup does not output signal only when input 2 is on and input 1 is off (so it's kind of a reverse implication, but with the same functionality). Currently, my setup takes up 4x2x8 (64) blocks.

How can this gate be simplified and/or compacted? How small can it get with command blocks?

Edit: I found a partial answer, but the command block solution has yet to be found.

  • There is a way to do this with command blocks, but it would be larger than the one above, however, there wouldn't need to be any redstone connection to the lamp, so the levers and/or lamp(s) could be placed anywhere.
    – ALX
    Nov 10, 2016 at 21:07

4 Answers 4


Lower: execute if block ~ ~ ~-1 minecraft:redstone_block unless block ~ ~1 ~-1 minecraft:redstone_block run setblock ~ ~1 ~ minecraft:redstone_block Upper:setblock ~ ~-1 ~ minecraft:air

both: repeat, unconditional, always active

Image of command block soluton

  • Looks interesting, I'll be checking it out soon, thanks!
    – user143228
    Nov 15, 2019 at 20:22

This answer won't explain how to make an implication gate using command blocks, it just solves the problem of too little space for the logical gate

You could try building the setup far away, then hooking up two levers to two seperate command blocks. Lever 1 activates Command Block 1 which places a redstone block in front of Input 1 (in your picture), activating it. Then you do the same again: Lever 2 activates Command Block 2, which places a command block in front of Input 2 in your picture. Then you can hook the Output (in your picture) up to another command block which can 1) Place a redstone block where you want a redstone impulse OR 2) You can just enter a command in that command block which will be activated

This way you will have enough space for your logical gates!


If you do not want to use redstone (which is a good idea for various reasons) or even no command blocks at all, you can use tags in a very easy way to do this.

As an overview, this is the logic gate of an "IMPLY gate", "A" and "B" being the inputs and "O" being the output of A→B:


So this means that the output is only off if A is on and B off (because only then the statement "if A, then B" is false). But this also means that you can easily check for A being true and B being false and then invert the output, which can be done with tags like this:

/execute unless entity @s[tag=A,tag=!B] run <command>

This <command> will always run unless you have the tag A and not the tag B, meaning that A has to imply B.


You can compact the gate to 3x2x4 = 24 blocks like this when both inputs are off (the redstone lamp is the output):


And that's the lowest amount of blocks you can get to without using command blocks, I'd say.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .