Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

I'm planning to build a clock tower for my SMP server; however, it's occurred to me that my plans have a gaping flaw: when nobody's online, the redstone clock won't keep time. I'm using vanilla, so Bukkit mods to keep chunks loaded won't work. Is it possible to use a different clock to count off hours, one that will keep running while I'm gone? Or better yet, somehow derive the time from the sun position?

share|improve this question
    
You can gather some relevant information from this question: How can I preserve an active redstone circuit when I leave the chunk it's built in? –  Olegs Jeremejevs Jan 3 '12 at 19:30
    
@MyFaJoArCo I saw that earlier, but I wasn't sure if there were any extra considerations for a server nobody's connected to as opposed to a chunk in an active world that's not being stood in, if that makes sense. –  Yamikuronue Jan 3 '12 at 19:35
    
Actually, these two situations are the same. Chunk has only two states - loaded and unloaded, doesn't matter in what context. So, feel free to use them. –  Olegs Jeremejevs Jan 3 '12 at 19:53
    
@MyFaJoArCo Interesting! I'd sort of assumed there was a 0-player "compressed" state for the server so it doesn't eat up a ton of resources computing things when nobody could possibly observe, much like how it used to "compress" the nighttime mob spawning while the player is asleep by doing only a few checks instead of simulating a whole night. –  Yamikuronue Jan 3 '12 at 19:56
    
No, the whole point of using the minecart is it's ability to save it's movement state (speed, direction), when the chunk is unloaded; server doesn't calculate anything. And there is another way: Is it possible to have a dummy player in SMP? –  Olegs Jeremejevs Jan 3 '12 at 20:49
add comment

2 Answers

up vote 1 down vote accepted

The only solution I can think of is using a light sensor to manually correct the time displayed on the clock, but it would likely be very complicated, and depending on how the clock tower is built, it might not work. What you would do is build a light sensor and feed its output into a special reset line that sets the clock to a certain time. When the sun rises, it would activate the light sensor and set the clock to whatever time sunrise should be.

Ideally, you would also take the output of the clock, and give the clock a time range in which to ignore the light sensor, so that the clock wouldn't be changing times every morning (because the time at which the light sensor activates is slightly random). If, say, you wanted sunrise to set the clock to 7:30, you could create a signal that is turned on when the clock reads any time from 7:20-7:40, invert it, and connect it to one input of an AND gate (the other being the output of the light sensor). The output of this AND gate would be the signal to set the clock to 7:30. This way, if the light sensor activated and the time was already near 7:30, the clock would ignore it. (Now that I think about it, this would be a good way to implement error detection in the clock as well, in case the timing is slightly off).

Here's a video of a light sensor and how to build it:

share|improve this answer
    
Hmm... My observable output only marks 1/4 days to avoid spam, so this might work for me - activating the first chime and resetting the clock tick at dawn. Then it'd go off dawn, noon, sunset, and midnight like I wanted. But for the general case, it's less than ideal for an accurate hourly clock. –  Yamikuronue Jan 3 '12 at 19:22
    
Yeah, it's not a very graceful solution, but since no Redstone can run while nobody is online, I can't think of any other way to keep track of time. It seems like it could work fairly well in your case, though. –  Kevin Y Jan 3 '12 at 19:25
add comment

It might be easiest to leave a dummy account eternaly logged it, but this is not ideal.

share|improve this answer
    
Unfortunately I'm hosting the server inside my network, and the machine it's on isn't powerful enough to be both a client and a server at the same time reliably (at least, not when we're all logged in) –  Yamikuronue Jan 3 '12 at 19:59
    
You might be able to tie a script to login/logout based on #users. and don't forget to put the dummy client on the lowest graphical settings. –  legacy Jan 10 '12 at 17:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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