1

This question already has an answer here:

I'm making a minigame where a player has to survive in essentially a world of hell. I am creating a "water bar", where players must drink to survive. It is a dummy scoreboard objective. I want to run the command "/scoreboard players @p remove water 1" every 3 minutes so players can run out of water. The current loop I have is a circle loop (https://i.ytimg.com/vi/0c-NGRXY5u0/maxresdefault.jpg) but much bigger than the one shown. Is there a way I can make a loop that's much smaller than the one I have currently but still sends a signal to the command block once every 3 minutes?

marked as duplicate by Virusbomb, Joachim, Gigazelle, arghtype, Nelson Jul 10 at 2:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Don't use a redstone clock for triggering command blocks! This is beyond bad and into extremely evil territory. You can make a long period clock with just a few command blocks and the scoreboard. There are other options available as well, but for the love of god don't use a redstone clock. – MBraedley Apr 27 '16 at 11:12
  • @MBraedley Wow, that's a bit of an extreme reaction to a tiny bit of caused lag. Sure, avoiding redstone is good, but it's not that extremely important. And that comes from the person who's currently in the process of removing the [minecraft-redstone] tag from almost all [minecraft-commands] questions. – Fabian Röling Sep 20 '18 at 9:06
  • @FabianRöling It has nothing to do with lag, at least not directly. Mixing redstone and command blocks is wrong in practically every situation. Using a redstone clock, especially a long period redstone clock is the worst example of mixing redstone and command blocks. That was just as true 2.5 years ago as it is today. When you see someone doing something this wrong, you don't indulge them, you correct them immediately. – MBraedley Sep 24 '18 at 15:17
0

You can make a slow clock quite easily with a minecart and cobwebs. Make a track that runs uphill and then falls onto cobwebs. For every cobweb you place, the minecart will take 30 more seconds to fall. Then, at the bottom, put powered rails and 1 detector rail to send out a signal, then connect that track to the one running uphill to make a loop.

0

You'll have to work out the math a bit, but a non-command block slow clock I like to use basically uses an And Gate with two asynchronous loops of redstone, with a single tick pulse going in circles until they both hit the And Gate at the same time. For example a loop of 10 ticks and a loop of 11 ticks set off at the same time will not line up until 110 ticks. Normally 110 ticks of delay would be over 27 repeaters, but using the two loops only costs 6 repeaters. You can dramatically increase duration by using a third loop, however finding the correct tick counts involves a bit of math; using a spreadsheet like Excel helps a lot.

Edit: I just did the math in Excel, because I love math, Excel, and redstone haha. One (there can be other possible solutions this is merely the first one I found by randomly typing in numbers) solution is 49 and 75 tick loops, which is 13 and 19 repeaters. These will only line up after 3675 ticks, which at 20 ticks a second is 183.75 seconds or basically just slightly longer than 3 minutes.

For comparison to achieve that long of a delay with just repeaters on their own you would need 919 repeaters. 32 repeaters or 919 repeaters...a clear choice to me!

  • Sorry I already had an appropriate answer. ↓ – rappatic Sep 19 '16 at 23:46
  • Questions can have more than one answer. ;) Plus variety is the spice of life. Perhaps the concept won't be useful now but it might be later on. For example the minecart/cobweb method requires quite a lot of vertical space, while mine requires more horizontal space. Depending on the needs of the situation either could be viable! :) – ZealousHypocrites Sep 20 '16 at 15:49
  • ok i tried it with my new map and it worked better than I expected thanks! – rappatic Sep 21 '16 at 21:45

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