M BUZZ CRAZE NEWS
// general

How can I make a lever disappear after one use?

By Daniel Rodriguez

Me and a friend have a private server where we try all sorts of things. We want to make a one use lever. Can this be done?

7

5 Answers

Using a command block to break the lever is the simplest solution.

Execute command after lever is pulled:

/setblock <X> <Y> <Z> minecraft:air 0 destroy

The XYZ is the coords of the lever. The "destroy" old block handling makes the command drop the item.

If you move the block a lever is attached to the lever will break.

Using this you can set up the block the lever is attached to to be movable by a piston. This piston is connected to the lever, so it moves the block once you switch the lever on, therefore breaking the lever.

For example like in the following picture. The lever of course can be on any side of the block it is attached to. A lot more complicated it would be if you want things to be flush with the wall, though...

(In the following picture the piston needs to be a sticky piston.)enter image description here

yes it can be done.

At the lever output wire, run a command block there that says:

/setblock (x of lever) (y of lever) (z of lever) minecraft:air 0 replace

Now split the output for where-ever you want it to do (Diagram Below):

A picture representation of the one time lever

Hope this helps :D

If you do not want to use command blocks, try a useless machine - something like this - something as simple as this will break the lever once it is pulled.The simplest useless machine in Minecraft.

You can extend the time it takes for the lever to activate and it to break by doing this (which is extendable):A delayed useless machine.

1

setblock -141 23 -12 minecraft:air replace

this worked for me in 1.17.1 :D

EXTRA TINY DETAIL THAT IF YOU DIDNT KNOW WOULD MAKE THIS EXTREMELY CONFUSING!!!

You cannot put a decimal, it has to be a solid number

so for example if your cords are actually -140.549 23 -11.300, you would put 140 23 11 instead of adding the decimal if you havent been through 5th grade math :)

ANOTHER TINY DETAIL!!!

i personally had to adjust my coords so if it doesnt work the first time try adjusting your coord numbers

ANOTHER ANOTHER TINY DETAIL!!!

the redstone that the lever acts on doesnt open fully because of how fast this command works, so sadly you wont be able to get that experience (if that was the purpose of your redstone)