I have recently found that my MC world does not auto-save (Don't answer on how to do that), so I have to /save-all every 5 minutes or so.

However, I have created a timer hooked up to a /save-all command block. Note that all repeaters are set to max delay.

/save-all timer

Basically, what happens is, there is a redstone signal passing through the repeaters. When it reaches the end, it hits out a command block and loops around back to the starting which goes through the timer again.

I have timed this as 2:24.

Is there a much efficient design to the timer or any part of the structure?
Is there also a way to increase the time without changing a major part of it?

Please don't suggest any latchology as I am terrible at it.

  • 4
    It might be worth noting that redstone circuits will only run if the chunk they are in is currently loaded, which I think depends on player position and view distance settings.
    – Wikwocket
    Feb 12 '13 at 14:15
  • 3
    @Wikwocket: The spawn chunks are always loaded. Put a clock there, and it'll always run.
    – MBraedley
    Feb 12 '13 at 15:26
  • and encase in bedrock so no-one messes with it Feb 12 '13 at 16:37
  • Seriously? You can compact this SO much using a minecart falling through spiderwebs.
    – DankMemes
    Feb 17 '13 at 22:36
  • This is probably too large to be loaded all the way in spawn chunks. I suggest a more compact design, like a smaller timer outputting to an incrementor circuit, whose output turns on once it hits a certain count.
    – Hugo Zink
    Jun 23 '14 at 14:21

You can vastly improve the performance of your times using MATHS.

You can see the principle outlined in another answer (this answer deals with redpower timers, but the principle is the same, you just need to do it with your vanilla timers instead). All you need to do is set up multiple timers, like the one you have there, but with coprime numbers of ticks (No common denominators).

AND the outputs of these timers and you can multiply the time your timers take very effectively.

  • 1
    35 (5x7) and either 33 (3x11) or 39 (3*13) make for good choices. By my quick math, both combinations result in about a 2 minute clock.
    – MBraedley
    Feb 12 '13 at 13:26
  • @MBraedley He is asking for 5min timer tho, but no clue what the coprime numbers are for 300 :p
    – Lyrion
    Feb 12 '13 at 14:24
  • @Lyrion The prime factors of 300 are 2, 2, 3, 5, 5, so you can easily construct coprime numbers for your timers from 4, 3, 25.
    – fredley
    Feb 12 '13 at 14:35
  • 1
    @Lyrion: It doesn't need to be exact. And you don't want the coprimes of 300, you want the coprimes of 3000, which means timers of 8, 3, 125, but that 125 is a little unwieldy, so I would do 13, 14, 17, which is slightly longer than 5 minutes. In this case, being exact isn't necessary. My first example simply reduces resources by about 90% and gets close to what he had before.
    – MBraedley
    Feb 12 '13 at 15:20
  • 1
    @Lyrion: There are 10 redstone ticks per second. Therefore, if you want 300 seconds, you need 3000 ticks.
    – MBraedley
    Feb 12 '13 at 16:03

Etho, SethBling, and MinecraftAddict have all demoed long period clocks using hoppers and comparators that were added in 1.5.

I'll explain Etho's design since it's fairly simple. Set up an RS-NOR latch using the new block of redstone: put down two pistons facing each other with a two block space in between, and then plop down a redstone block. Cap off the ends with just some redstone dust. These are the inputs for the latch.

One one side of the RS-NOR latch, put down two hoppers feeding into each other. Then place comparators coming out of the hoppers next to the pistons, and have them power a block.

When the hopper has items, it'll power the block, powering the redstone dust, powering the piston. When first starting, you'll put items into one hopper (H1), and the other will be empty (H2). Since H1 has items, its piston is powered, pushing the redstone block next to H2. H2 is now powered, so it can't empty its items into H1. H1 empties all of its items, causing its piston to become unpowered. The H2 piston extends, causing H2 to become unpowered and H1 to be powered. Items now flow back to H1.

You can pull your clock signal from one of the two spaces the redstone block will be to power your command block, or just put your command block right next to it.

In all, the clock is 6wx2dx1h, plus outputs. Much smaller and less expensive (although expense doesn't matter in creative) than your current setup.

There's also some details about this type of clock on the Minecraft Wiki.

  • 1
    Also, combine this with @fredley's answer and you can get ultra long clocks.
    – MBraedley
    Feb 12 '13 at 13:36
  • Um, it's kinda hard to tell what you're trying to explain here.....
    – MerajA
    Feb 17 '13 at 12:46
  • @Meraj99: Did you watch the videos? Because that's all I'm doing; describing one of Etho's designs.
    – MBraedley
    Feb 17 '13 at 13:26
  • Problem is, my server is 1.4.7, and it doesn't include hoppers and redstone blocks.
    – MerajA
    Feb 17 '13 at 13:31
  • @Meraj99: Yes, but presumably it'll be updated to 1.5 when it's released. You can use fredley's design now, which I fully endorse, or wait the few weeks for 1.5 to be released.
    – MBraedley
    Feb 17 '13 at 13:38

there's an incredibly simple 5 minute timer. (If 5 minute is the real requirement.)

5 minutes is the time it takes for a dropped item to decay.

So, this timer below very nicely and exceptionally reliably. It does require "feeding" (note the hopper in the foreground...) but you could easily attach it to a item generator (sugar cane farm works nicely).

enter image description here

  • For a countdown timer on a custom game map, yeah, this is great, but remember that this is for a SMP map, where reloading items could become problematic.
    – MBraedley
    Apr 2 '13 at 2:35
  • Also, wouldn't the items despawn if the chunks are not loaded?
    – MerajA
    Apr 2 '13 at 10:34
  • @MBraedley Sorry, no experience with SMP. What is the issue with reloading items on an SMP map that is different from a single player map? I've had this timer running on my vanilla single player world, and in its current state, it's never glitched on me.
    – John
    Apr 2 '13 at 11:35
  • @John Nothing, except that the server could be active with players on it, yet there isn't anyone refilling the dropper or dispenser. Also, the idea is for it to be maintenance free, which this isn't.
    – MBraedley
    Apr 2 '13 at 13:38
  • @Meraj99 The other clocks won't run if they're chunks aren't loaded. That issue affects all designs. Luckily, there are a number of chunks near the server spawn that always remain loaded.
    – MBraedley
    Apr 2 '13 at 13:39

This is sethbling's video about command block timing.

What you need to do is copy this design exactly except:

  1. Forget all about the "Timing" objective. This contraption will be running all the time.
  2. In the two command blocks that handle the timing, make sure that there are no arguments that have to do with the "Timing" objective.
  3. Add the following device to the clock:


Numbers = Command Blocks

-> = Repeaters

^ = Comparators

_ = The line from the clocks

This is the system:

_ -> 1 ^ -> 2 -> 3

1 = testfor @a[score_min_Time=(Your time in tenths of seconds)]

2 = save-all

3 = scoreboard players set @a Time 0

That should be good.

  • 2
    This isn't a great solution because it's dependent on players acting as the timers. Funny stuff can start happening if players log in or out. It's also meant for short time spans, like 10 seconds, not the 5 minutes needed for a save all timer.
    – MBraedley
    May 15 '13 at 11:48

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