Merge pull request #192 from nixnax/master
Change world.time to world.totalTime
This commit is contained in:
commit
964aba1278
1 changed files with 2 additions and 2 deletions
|
@ -33,9 +33,9 @@ exports.LCDClock = function(drone, fgColor,bgColor,border) {
|
||||||
var clock = this;
|
var clock = this;
|
||||||
function tick() {
|
function tick() {
|
||||||
var rolloverMins = 24*60;
|
var rolloverMins = 24*60;
|
||||||
var timeOfDayInMins = Math.floor(((world.time + 6000) % 24000) / 16.6667);
|
var timeOfDayInMins = Math.floor(((world.totalTime + 6000) % 24000) / 16.6667);
|
||||||
timeOfDayInMins = timeOfDayInMins % rolloverMins;
|
timeOfDayInMins = timeOfDayInMins % rolloverMins;
|
||||||
console.log('Minecraft time: ' + world.time + ' timeOfDayInMins: ' + timeOfDayInMins);
|
console.log('Minecraft time: ' + world.totalTime + ' timeOfDayInMins: ' + timeOfDayInMins);
|
||||||
clock.update(timeOfDayInMins);
|
clock.update(timeOfDayInMins);
|
||||||
};
|
};
|
||||||
intervalId = setInterval(tick, 800);
|
intervalId = setInterval(tick, 800);
|
||||||
|
|
Reference in a new issue