1
I am working on a castle and been using the
/fill xyz x2y2z2 old_oak_fence 0 replace air
or the reversal to give me a portcullis raising and lowering effect.
Now I'd like to advance it to open an close off of the same button.
Open Gate
|
|
?-----------------Button
|
|
Close gate
At '?' I wanted to put in a logic gate, preferably a command_block but would try a redstone gate. ideally at '?' if the gate is closed it would send power up, and if it detects that it's closed it would send power down.
Could I use /test for in this simple circuit? Or do you have a better suggestion?
/fill xyz x2y2z2 old_oak_fence 0 replace air
or the reversal to give me a portcullis raising and lowering effect.
Now I'd like to advance it to open an close off of the same button.
Open Gate
|
|
?-----------------Button
|
|
Close gate
At '?' I wanted to put in a logic gate, preferably a command_block but would try a redstone gate. ideally at '?' if the gate is closed it would send power up, and if it detects that it's closed it would send power down.
Could I use /test for in this simple circuit? Or do you have a better suggestion?
Create an account or sign in to comment.
1
1
You could use a /testforblock on one of the blocks inside the gate to see if there is a fence or air there. That should essentially toggle to circuit each time you press the button. You could also put a T flip flop there, which may end up being slightly more reliable if the button is pressed quickly.