8 posts
Posted 17 March 2014 - 12:07 AM
Hello ComputerCraft Community!,
I was recently wondering how to check the tick time in minecraft, a tick in minecraft is 1/20 of a real life second. Also I was wondering if It could say if it is day (1-20,000) or night. I didn't tell how many ticks are in night because I don't know that either, so thanks for an admin for approving this post and thanks for people who read and answer posts on this forum. :D/>
1281 posts
Posted 17 March 2014 - 06:10 AM
You can use os.time to know what minecraft time it is. Getting the current tps is a lot more tricky, since it decides how fast the computer runs aswell, thus affecting any means it has of gauging it.
1610 posts
Posted 18 March 2014 - 12:52 PM
Only way I can think of is via HTTP. os.clock *may* be a constant rate but it is difficult to tell.
8543 posts
Posted 18 March 2014 - 02:32 PM
All of the built-in time stuff takes tick rate as gospel, so there are always 20 ticks to the second as seen by the computers, regardless of how long those twenty ticks take in real time.
1281 posts
Posted 18 March 2014 - 03:15 PM
In other words, http would be the only option.
1190 posts
Location
RHIT
Posted 18 March 2014 - 03:22 PM
In other words, http would be the only option.
Not really. You don't need the tick rate or anything else involving 'real world' time if all you need to do is determine the day/night cycle, which seems to be what the OP is looking for. In fact, I can't really fathom a reason to use real world time except to perform tasks at a particular time or as a clock. Most MC related tasks would be monitored using MC time units.
Edited on 18 March 2014 - 02:24 PM
1281 posts
Posted 18 March 2014 - 04:15 PM
I already pointed out how to check the in-game time, what we're discussing beyond that is purely checking the current tps.
I was recently wondering how to check the tick time in minecraft
Although what you are saying is very true, as few tasks could possibly require such a thing, it's still an interesting thing to be able to keep tabs on. The tps on a server has a direct correlation to server-side lag, and as such might be useful to know.