From da673ebdcd844f0224bb6c4f2c4c90cc3b454252 Mon Sep 17 00:00:00 2001 From: nixnax Date: Fri, 2 Jan 2015 16:22:45 -0600 Subject: [PATCH] Change world.time to world.totalTime Fixes the "NAN" bug in LCDClock() --- src/main/js/plugins/drone/contrib/lcd-clock.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/js/plugins/drone/contrib/lcd-clock.js b/src/main/js/plugins/drone/contrib/lcd-clock.js index b6fc492..4bbf521 100644 --- a/src/main/js/plugins/drone/contrib/lcd-clock.js +++ b/src/main/js/plugins/drone/contrib/lcd-clock.js @@ -33,9 +33,9 @@ exports.LCDClock = function(drone, fgColor,bgColor,border) { var clock = this; function tick() { 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; - console.log('Minecraft time: ' + world.time + ' timeOfDayInMins: ' + timeOfDayInMins); + console.log('Minecraft time: ' + world.totalTime + ' timeOfDayInMins: ' + timeOfDayInMins); clock.update(timeOfDayInMins); }; intervalId = setInterval(tick, 800);