Why remove redstone dust from my command block contraptions?

[BACK]
Why remove redstone dust from my command block contraptions?
Posted On: December 29, 2023

Whenever I show my command block contraptions to my friends, they always comment that I should remove the redstone dust from them. They say it causes lag and that redstone can be unpredictable, but I've never had a problem like that. 


Even if I did, I would just slow down the clock I'm using a bit and add comparators or repeaters to get it to work. Besides, if I don't use redstone dust, how am I supposed to activate things like pistons and redstone lamps?


If I need redstone dust in order to make my command block contraptions work, why am I being told to get rid of it? What logical reason is there for this?


Question from user MBraedley at stackexchange.


Answer:

Your friends are right, redstone dust is evil and it should be avoided at all costs when making command block contraptions. Redstone dust does cause lag and it can be unpredictable. There's a nice blog post explaining why this is the case, but suffice it to say that pretty much every expert map maker limits their use of redstone dust to very specific edge cases, and it's never used on high frequency lines.


So, what should you be using instead? For a clock, use a 20Hz clock. Better yet, start using 1.9 and use repeating command blocks. For turning on a redstone device, use setblock to place a redstone block or torch at the activation point. This is especially useful for when your command blocks are far away from any redstone contraption (as they should be).


The only actual redstone that you should have in your command block contraption is redstone blocks (for activating the command blocks), comparators (for testing for a success on a command block, but even these aren't necessary; use the stats command instead), and on the extremely rare occasion, a repeater. Also, sometimes a button or switch, but that should be given. But that's for 1.8, and in 1.9, the entire command block game changes. 1.9 will allow you to remove even more redstone, to the point where you don't need any (not even a switch or button) to do something useful. Again, you'll need to be able to interface with redstone devices from time to time, but as I said above, that should be done with something like a setblock command.


In the end, you should do your best to keep your redstone stuff and your command block stuff separated. There was a time when this wasn't possible, but that was ages and ages ago, when the command block was first introduced. New commands made it possible to separate your redstone and command blocks, and with the new features in 1.9, this becomes even easier to do; you no longer need to think about how to build a 20Hz clock, execution order is trivialized to block placement, and conditional execution becomes built in. Redstone dust is great for making interesting contraptions in survival, but it has no place in your creative mode command blocks.


Minecraft v1.13 has changed the game again. Now, you don't even need command blocks in your world, you can use functions instead and tag them to run either every tick, or when the world loads. (Admittedly, some of this was available in earlier versions, but 1.13 was a major update to commands which made for a compelling reason to move as much as possible to functions.).


Command blocks will still be necessary in some very narrow circumstances (conditional execution in some cases is still difficult using just functions), but other than prototyping, I would recommend using functions instead of command blocks for most purposes. There's loads of reasons for doing this, but among the top reasons I see are:.


Code reuse and deduplication.


Maintainability.


Ease of reading.


Something to keep in mind, though, is that a number of commands have been removed/replaced in 1.13, such as the stats command mentioned above (the new version as part of the execute command is actually a lot easier and more intuitive now). The power of commands has grown substantially since the command block was introduced in 1.4, but redstone has only seen incremental improvements. Most of the improvements in redstone were with the addition of blocks aimed at eliminating the need for BUD switches (those blocks being daylight detector and observer blocks). Other than that, there isn't much in the way of new redstone, whereas commands have been evolving almost with every release.


Answer from user MBraedley at stackexchange.



[BACK]
Why remove redstone dust from my command block contraptions?
Posted On: December 29, 2023

Whenever I show my command block contraptions to my friends, they always comment that I should remove the redstone dust from them. They say it causes lag and that redstone can be unpredictable, but I've never had a problem like that. 


Even if I did, I would just slow down the clock I'm using a bit and add comparators or repeaters to get it to work. Besides, if I don't use redstone dust, how am I supposed to activate things like pistons and redstone lamps?


If I need redstone dust in order to make my command block contraptions work, why am I being told to get rid of it? What logical reason is there for this?


Question from user MBraedley at stackexchange.


Answer:

Your friends are right, redstone dust is evil and it should be avoided at all costs when making command block contraptions. Redstone dust does cause lag and it can be unpredictable. There's a nice blog post explaining why this is the case, but suffice it to say that pretty much every expert map maker limits their use of redstone dust to very specific edge cases, and it's never used on high frequency lines.


So, what should you be using instead? For a clock, use a 20Hz clock. Better yet, start using 1.9 and use repeating command blocks. For turning on a redstone device, use setblock to place a redstone block or torch at the activation point. This is especially useful for when your command blocks are far away from any redstone contraption (as they should be).


The only actual redstone that you should have in your command block contraption is redstone blocks (for activating the command blocks), comparators (for testing for a success on a command block, but even these aren't necessary; use the stats command instead), and on the extremely rare occasion, a repeater. Also, sometimes a button or switch, but that should be given. But that's for 1.8, and in 1.9, the entire command block game changes. 1.9 will allow you to remove even more redstone, to the point where you don't need any (not even a switch or button) to do something useful. Again, you'll need to be able to interface with redstone devices from time to time, but as I said above, that should be done with something like a setblock command.


In the end, you should do your best to keep your redstone stuff and your command block stuff separated. There was a time when this wasn't possible, but that was ages and ages ago, when the command block was first introduced. New commands made it possible to separate your redstone and command blocks, and with the new features in 1.9, this becomes even easier to do; you no longer need to think about how to build a 20Hz clock, execution order is trivialized to block placement, and conditional execution becomes built in. Redstone dust is great for making interesting contraptions in survival, but it has no place in your creative mode command blocks.


Minecraft v1.13 has changed the game again. Now, you don't even need command blocks in your world, you can use functions instead and tag them to run either every tick, or when the world loads. (Admittedly, some of this was available in earlier versions, but 1.13 was a major update to commands which made for a compelling reason to move as much as possible to functions.).


Command blocks will still be necessary in some very narrow circumstances (conditional execution in some cases is still difficult using just functions), but other than prototyping, I would recommend using functions instead of command blocks for most purposes. There's loads of reasons for doing this, but among the top reasons I see are:.


Code reuse and deduplication.


Maintainability.


Ease of reading.


Something to keep in mind, though, is that a number of commands have been removed/replaced in 1.13, such as the stats command mentioned above (the new version as part of the execute command is actually a lot easier and more intuitive now). The power of commands has grown substantially since the command block was introduced in 1.4, but redstone has only seen incremental improvements. Most of the improvements in redstone were with the addition of blocks aimed at eliminating the need for BUD switches (those blocks being daylight detector and observer blocks). Other than that, there isn't much in the way of new redstone, whereas commands have been evolving almost with every release.


Answer from user MBraedley at stackexchange.



[BACK]

In Skyrim How do I unselect a completed quest? In Skyrim How do I unselect a completed quest?

Posted On: May 3, 2023
A completed quest in my journal is selected, as shown below:. This causes new quests to not be selected immediately. How can I unselect it? Clicking on the quest title does not deselect it. Q...[More]


Is Abdel Adrian just book canon or is he also canon to BG3? Is Abdel Adrian just book canon or is he also canon to BG3?

Posted On: July 31, 2025
I was going to play BG3 after I finished another game that’s taking up most of the storage on my SSD but I reached a slow point in that game so I was thinking of trying BG1 and BG2 first.So I saw th...[More]


How do I start a Single Player - Multi Player game with a custom map in Starcraft II? How do I start a Single Player - Multi Player game with a custom map in Starcraft II?

Posted On: January 14, 2023
This may sound a little bit silly, but I can’t seem to find how to do this. Single Player -> Vs. A.I. seems the way for single player, but then I can’t find a way to select my map. I...[More]


How to get drow gf? How to get drow gf?

Posted On: April 5, 2025
Used a stupid title just in case I don't spoil anyone, but you know what I mean. .I want to recruit Minthara. I understand I do that by knocking her out non-lethal style in the goblin camp. However I ...[More]


How can I see the version of steam deck? How can I see the version of steam deck?

Posted On: May 18, 2023
I was thinking about buying a Steam Deck and to save a couple of bucks, figured I'd try to buy one used. Before I hand over the cash, I'd like to verify the one I'm buying is as advertised...[More]


What job would your MC Perdue after finishing school at Hogwarts? What job would your MC Perdue after finishing school at Hogwarts?

Posted On: June 21, 2023
I think my Ravenclaw would love to be come an Unspeakable. We loved professor Hecat and with what we’ve learned about the ancient magic I’d imagine it would be the profession that helped h...[More]


What is the difference between Yakuza 0 and Yakuza 6? What is the difference between Yakuza 0 and Yakuza 6?

Posted On: March 27, 2023
Sometimes I see Ryu Ga Gotoku 6 (an opus of Yakuza). Interested by the game I decided to see if I could order it, but the only one available is Yakuza 0. I quite don't understand what's the li...[More]


In Hogwarts Legacy, Am I the only one who prefers the switch Hagrid? In Hogwarts Legacy, Am I the only one who prefers the switch Hagrid?

Posted On: April 19, 2023
Question from user supxleon123 at HogwartsLegacyGaming at reddit.com. Answer: We’re getting a PS5 hagrid? Answer from user UglyPuta- at HogwartsLegacyGaming at reddit.com....[More]


Nexus Mod Manager wont recognize Fallout New Vegas Nexus Mod Manager wont recognize Fallout New Vegas

Posted On: February 8, 2023
I have trouble opening NMM for my New vegas game saying that it does not have the permission to write the game and I've been told that I should run as admin to open it, but :.Can someone please explai...[More]


so…uh… how many do - don’t use the parasite powers? so…uh… how many do - don’t use the parasite powers?

Posted On: January 30, 2025
i saw a post the other day talking about the things you do/dont don’t do in a run and a lot of people were like (on their first run mind you) “i would never use weird powers that some random perso...[More]