Arqade Asked on July 17, 2021
I need to use a command block
to activate a lever
in Bedrock edition. I thought I could use /setblock
but the syntax for Bedrock edition doesn’t seem to support it:
/setblock <position> <tileName> [tileData] [replace¦destroy¦keep]
I ran into a similar issue with trying to set the state of a redstone lamp
recently and discovered that we’ve been provided with a lit redstone lamp
object to use instead. However, no such variant exists for the lever:
How can I activate a lever with a command block in Bedrock edition?
As per on the wiki,
You'll want to:
/setblock ~ ~ ~ lever ["open_bit":1,"lever_direction":"north"] replace
(Don't actually /setblock ~ ~ ~
unless you want to replace your command block)
/setblock
is supported on Bedrock, but some block have rejigged states and syntax and some commands changed.
Also, you'll need to know which direction your lever is facing.
Correct answer by aytimothy on July 17, 2021
While I type this, Bedrock Edition is still utilizing the data value.
Using the official Wiki, just add 8
to the data value to make an unpowered one powered, and just subtract 8
to make it unpowered (for /setblock
and the like).
Source: Minecraft Wiki
Answered by Katie Heart on July 17, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP