Module:ClockPhase

local p = {} function p.base( f )

local arg = require( 'Module:ProcessArgs' ).merge( true )[1] or 0

local num = tonumber(arg)

if type(num) == "number" then

num = (num % 24000) / 24000 return f:expandTemplate{ title = 'Sprite', args = { image = 'ClockPhase.png', url = 'url%28https://static.wikia.nocookie.net/minecraft_gamepedia/images/archive/4/47/20200826015318%21ClockPhase.png%29', sheetsize = 256, size = 16, pos = math.floor((num * 64 + 48) % 64) + 1, scale = 2, }   }

else

local keys = { day = 1000, noon = 6000, sunset = 12000, night = 13000, midnight = 18000, sunrise = 23000 }

local word = string.lower(arg)

if keys[word] ~= nil then num = (keys[word] % 24000) / 24000 else num = 0 end

return f:expandTemplate{ title = 'Sprite', args = { image = 'ClockPhase.png', url = 'url%28https://static.wikia.nocookie.net/minecraft_gamepedia/images/archive/4/47/20200826015318%21ClockPhase.png%29', sheetsize = 256, size = 16, pos = math.floor((num * 64 + 48) % 64) + 1, scale = 2, }   }

end end return p