Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This program runs and tells you how far into the day/night cycle a given area is.
- -- This is set to 80 minutes by default, for use with Galacticraft, but it can be set for any area that has day/night.
- -- Just change the dayCycle variable to the number of RL minutes.
- dayCycle = 80
- dayTime = 0
- while true do
- -- This counts the time during the day.
- while redstone.getInput("left") do
- term.clear()
- print("Moon day: "..dayTime.." / "..dayCycle)
- dayTime = dayTime + 1
- os.sleep(60)
- end
- -- Reset the time of day counter
- dayTime = 0
- -- This counts the time during the night.
- while not redstone.getInput("left") do
- term.clear()
- print("Moon night: "..dayTime.." / "..dayCycle)
- dayTime = dayTime + 1
- os.sleep(60)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement