This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Asuleath's profile picture

[Question] How to get the actual minecraft day ?

Started by Asuleath, 11 November 2012 - 07:55 PM
Asuleath #1
Posted 11 November 2012 - 08:55 PM
Hi !

I'm new on ComputerCraft, and yesterday i wanted to made a program which would use the actual minecraft date(the day number in fact, because i don't think there's months).
I checked the apis, and used the search function on the forum, but i found nothing about it.
Is there any way to do that ? If not, is it planned to add a function of this type ?

Sorry for my bad english, it's not my native language. :unsure:/>/>

Thanks you for your help !
Asuleath.
Lyqyd #2
Posted 11 November 2012 - 09:15 PM
It would appear that this is not possible. The time is available through os.time, but not the date. I'm not certain whether the Minecraft world save data tracks the number of days that have passed (I doubt it), so if this data isn't available that way, it would be impossible to reliably determine.
Asuleath #3
Posted 11 November 2012 - 11:50 PM
Ok, thank you.
I will work without it so.
Doyle3694 #4
Posted 12 November 2012 - 12:40 AM
but doesn't NEI say like: "Day 16" when you press the dawn button? and that number increases for each day? I dont know if thats native MC coding, cloudy or dan will have to answer that.
Lyqyd #5
Posted 12 November 2012 - 06:11 AM
but doesn't NEI say like: "Day 16" when you press the dawn button? and that number increases for each day? I dont know if thats native MC coding, cloudy or dan will have to answer that.

If that's the case, a quick nbt-edit of the world data file should reveal a date value. Interesting to know, if that's the case! I am somewhat surprised that vanilla minecraft would track the number of days passed in the world. Either way, ComputerCraft does not seem to offer any methods to retrieve the date at this time.