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?
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...
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)