MCPcopy
hub / github.com/walterhiggins/ScriptCraft / getTime24

Function getTime24

src/main/js/modules/utils/utils.js:494–499  ·  view source on GitHub ↗

### utils.time24( world ) function Returns the timeofday for the given world using 24 hour notation. (number of minutes) See http://minecraft.gamepedia.com/Day-night_cycle#Conversions #### Parameters * world : the name of the world or world object for which you want to get time

(world)

Source from the content-addressed store, hash-verified

492
493***/
494function getTime24(world) {
495 world = _world(world); // accept world name or object or undeifned
496 var mcTime = getTime(world);
497 var mins = Math.floor(((mcTime + 6000) % 24000) / 16.6667);
498 return mins;
499}
500exports.time24 = getTime24;
501
502/************************************************************************

Callers

nothing calls this directly

Calls 2

_worldFunction · 0.85
getTimeFunction · 0.85

Tested by

no test coverage detected