Merge pull request #192 from nixnax/master

Change world.time to world.totalTime
This commit is contained in:
Walter Higgins 2015-01-03 08:30:20 +00:00
commit 964aba1278

View file

@ -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);