2

I've reviewed several articles and other questions (here's one), trying to trace down a way to activate a redstone lamp using a command block. Everything I've found says to use:

/setblock x y z minecraft:redstone_lamp[lit=true]

I get a syntax error within the braces saying that lit was unexpected:

Screenshot of error.

How can I activate a redstone lamp with a command block?

2 Answers 2

0

In Bedrock edition there's a seaparate object ID for the lit block state of the redstone lamp:

Screenshot of new object.

So instead of using block states like you would in Java edition:

setblock x y z redstone_lamp[lit=true]

You should specify the object ID for the lit redstone lamp:

setblock x y z lit_redstone_lamp

Special thanks to @Penguin for pointing out in a comment that, while my initial answer was correct, my explanation was wrong. I've adjusted my answer to clarify this for future readers.

2
  • 2
    The answer is right however the explanation is wrong. That is what the ID of the lit version is, and what you were trying to do is use block states like in Java Edition but this block state isn't supported in Bedrock Edition.
    – Penguin
    Jun 17, 2021 at 13:22
  • @Penguin thanks for that clarification! I've updated my answer to make that information readily available for future readers! Jun 17, 2021 at 16:23
-1

If you are playing Java edition, I don't know how I can help you,* however if you are playing bedrock edition, you can use the command: /setblock (x y z) lit_redstone_lamp and you are good to go. Or you can use the testfor command to detect what you want. So if it detects what you put in the command, it will give a direct output from the command block through a comparator.

*I don't play Java edition, only bedrock. Not that I don't like it, but because I can't get it, unfortunately.

1
  • 1
    What information does this convey that is not already conveyed by the other answers?
    – pppery
    Mar 27 at 1:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .