Mineuniverse
Log in Register
Plugins

CircadianRhythm

Customise minecraft day and night cycle
by _ForgeUser23127720
Download Claim this project
763 downloads
0 likes
Updated Jun 30, 2026
0 hypes
Admin Tools Fun General Mechanics World Editing and Management

Circadian Rhythm By Lowbrain

Information

This plugin is intended to replace minecraft day and night cycle (20 min). Make it longer, smaller, your choice. It is free and open source. Use it, copy it, do what ever you want with it :)

PS : For it do work properly you will need to set gamerule.doDaylighCycle false

You can find the source code >>HERE<<.

How it works

It is basic mathematics.

public void syncTime() {
    	int hpd = this.getConfig().getInt("hoursPerDay");
    	double timespeed = (24/hpd);
        Calendar d = Calendar.getInstance();
        int h = d.get(11) + this.getConfig().getInt("hoursOffset");
        h = (int) (h * timespeed);
        if(h > 24)h -= 24;
        int m = d.get(12);
        m = (int) (m * timespeed);
        if(m > 60){
        	m -= 60;
        	h += 1;
        }
        if(this.getConfig().getBoolean("debug")){
        	this.getLogger().info("Time : " + h + "hrs " + m + " min");
        }
        long ticks = 1000 * h + (m *= 16) + 18000;
        ((World)this.getServer().getWorlds().get(0)).setTime(ticks);
    }
  • First, the time-speed is set by dividing a real day and night cycle (24 hrs) by the value of your choice (in config). For example, if it's set at 12 hrs, the time-speed will be 2x.
  • It then gets the server's current time
  • Multiply the hours by the time-speed, if the value gets higher then 24, we subtract 24 meaning it's a next day
  • Same goes for the minutes
  • Convert to tick for minecraft and then you're done !

If you set the hours per day to 24 you'll get the real time

Configurations

updateInterval
  • default value : 300
  • description : The amount of time between each time the time is set. If you lower the hoursPerDay value, i recommend to lower this one as well, it will be more fluid and won't really affect the performance.
hoursPerDay
  • default value : 12
  • description : the number of hours for a complete day-night cycle in minecraft
debug
  • default value : false
  • description : show the new time in console
hoursOffset
  • default value : 0
  • description : offset hours with the server. For example, if you and the server are in a different time zone, you could set this value to the time zone diffences
CircadianRhythm V 1.0.0
MC 1.10
Release 2016-06-29 Get
CircadianRhythm V1.1.0
MC 1.10
Release 2016-06-29 Get

More from _ForgeUser23127720

MCGravity
1,363

You Might Also Like

MobHealth
Simple plugin to let you know the damage you just caused to a mob, and how much health it has left.
989,881
Player Heads
Lop off Player and all Mob Heads with configurable drop rates + pvp-farming nerf, includes detailed commands and permissions
979,351
Advanced Item Effects
Adds custom effects to any item including potion effects.
97,290
VoxelMore
"Sharing is caring."
9,999
SunSteel
A Golden Item Enhancement Plugin
9,880
Sneaker
Hide name tags above players' heads.
9,865