Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local cmd = "time set day"
- local cb = component.command_block -- get primary command block
- -- os.time() returns "in-game seconds" with a 6000 tick offset, so that
- -- midnight is actually midnight.
- local ticks = math.floor(1000/60/60 * os.time() - 6000)
- print(os.date())
- cb.setValue(cmd)
- cb.run()
- print(os.date())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement