
MCGravity
- 1.3K
- Bukkit Plugins
Make minecraft more realistic with a new approach of real life gravity !
- 1.3K
- July 3, 2016

MCGravity
- 1.3K
- Bukkit Plugins
Make minecraft more realistic with a new approach of real life gravity !
- 1.3K
- July 3, 2016
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<<.
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); }
If you set the hours per day to 24 you'll get the real time
Make minecraft more realistic with a new approach of real life gravity !
Make minecraft more realistic with a new approach of real life gravity !