What would be the correct command to place a redstone torch at 1043 58 982 when the timer starts at 20 and remove it when the timer reaches 0 in the 1.14.2 version of Minecraft.

I think this would most likely use two different command blocks.

So far I've made a timer that starts at 20 and a Times_Up objective that equals 0.

This is the best I could come up with in a repeat command block that is always active:

/execute if score Timer Timer > Times_Up Times_Up run fill 1043 58 982 1043 58 982 minecraft:redstone_torch
  • 1
    …and why does that not work? It's inefficient, because setblock works as well, but other than that I see no problem here. – Fabian Röling Jun 22 '19 at 13:57
  • I see what you mean. It might be a problem with my scoreboard commands. Thanks! – DeathShade Jun 22 '19 at 14:25
  • 1
    But I don't see what you mean. Please explain. – Fabian Röling Jun 22 '19 at 15:30

You can trigger this command at the same time as you trigger the timer, probably by using a chain command block:

/setblock 1043 58 982 minecraft:redstone_torch

It will place a redstone torch at the specified coordinates. If it isn´t possible for you to trigger any other command at the same time as you start the timer, then you can use this command in a repeating command block instead:

/execute if score Timer Timer > Times_Up Times_Up run setblock 1043 58 982 minecraft:redstone_torch

You can use this command to remove the torch if the time is up:

/execute if score Timer Timer <= Times_Up Times_Up run setblock 1043 58 982 air
  • I got the redstone torch to be placed, but the redstone torch does not seem to be removed when the timer hits 0 and into the negatives. Is there something I have to do with the scoreboard command blocks that I have? – DeathShade Jun 22 '19 at 14:36
  • I got the command blocks to work now. Thanks! – DeathShade Jun 22 '19 at 14:43

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.