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?
-
I think so, but I'm not sure how complicated it would be. Basically, the lever would need to have a simple memory circuit attached to it that makes the lever, once turned on, useless if ever turned off. I may try building one later if no one answers; if I do, I'll take screenshots and answer myself ^_^– gatherer818Commented Aug 2, 2015 at 11:58
-
well no i dont want it useless i want the lever to break after use– user120175Commented Aug 2, 2015 at 12:23
-
Is one use turning it on, then turning it off? Or should it break just after it turns on?– gatherer818Commented Aug 2, 2015 at 12:24
-
no the player gets a lever then he places it and he turns it on and after for example 3 seconds the lever breaks– user120175Commented Aug 2, 2015 at 12:26
-
Ah, I see. That's a bit more complex, I guess, although I bet it can be done with command blocks. But I don't know those, so that the end of my usefulness.– gatherer818Commented Aug 2, 2015 at 12:27
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.)
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):
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.
You can extend the time it takes for the lever to activate and it to break by doing this (which is extendable):
-
If you want more advanced useless machines, try finding it on YouTube (people like SethBling, Mumbo Jumbo, the redstone experts... that sort of thing). Commented Aug 5, 2015 at 10:37
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)