I wanna know how can I make a lever invulnerable so that lava can't burn it and a player can't remove it.

I tried the following but it didn't work :

/scoreboard players tag @e[item=lever,r=10] add iMarker
/entitydata @e[tag=iMarker] {Invulnerable:1}

This processes something and no errors are shown but still the lever is burned by lava.

  • Lava shouldn't burn levers? – user140963 May 21 '16 at 14:39
  • Well if lava goes on it, the lever disappears. – Lich4r May 21 '16 at 14:43
  • 1
    That isn't the lever burning (though the raw item will burn), that is the lava "washing" the lever away. – user140963 May 21 '16 at 14:49
  • Well maybe. I wanna avoid this. I know it's possible with ArmorStand so why not lever ? :) – Lich4r May 21 '16 at 14:53
  • 1
    Because a armor stand is a entity, a lever is a block/item. – user140963 May 21 '16 at 14:53

Method 1: place signs or simmilar blocks around the lever. For the lever not to be destroyed by Players give then Adventure mode (/gamemode @a a)

Method 2: Use this all-version-usable Command block & Redstone syntax:


Where the lever is at positive X from the Redstone. The right Command block has this command:

/testforblock ~+2 ~ ~ minecraft:lever

And the left one has this:

/fill ~+7 ~ ~ ~+7 ~ ~ minecraft:lever N

Instead of N use the lever rotation value. List of possible rotations:

N | Rotation

0: Lever on block bottom points east when off.
1: Lever on block side facing east
2: Lever on block side facing west
3: Lever on block side facing south
4: Lever on block side facing north
5: Lever on block top points south when off.
6: Lever on block top points east when off.
7: Lever on block bottom points south when off.
  • The lever can get destroyed, but immediatley replaced

  • I think you can remove the Repeater :-)

  • You can have the command blocks really far away, it works the samr, just the coordinates will be different.

  • You can update this to use the 1.9 Command block stuff

  • It's easy-to-build! Go do it yourself!

| improve this answer | |
  • 1
    It works but it's not really convenient as I don't have much space and more than one lever to be "invulnerable". Is this the only way to process ? (As it isn't really an answer to my question) – Lich4r May 21 '16 at 15:18
  • @FromBabylon I don't know any non-command block way of saving a lever in rising lava :D – RudolfJelin May 21 '16 at 16:37
  • 1
    @FromBabylon WAIT! I know! Added it to the answer: surround the lever with see-through blocks, eg. signs! – RudolfJelin May 21 '16 at 16:40
  • 1
    I already done that but it's not pretty :P Thanks – Lich4r May 21 '16 at 17:07
  • @FromBabylon awwwwwwww I won't get the check mark :D – RudolfJelin May 21 '16 at 17:08

Another way to make an invunruble lever, is to get the coordinates of the lever and enter this command:

/setblock x y z minecraft:lever

on a repeat Command block.

That would work best when you have a map where you want to have them break stuff other then the lever. Hope this helped!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.