#What's different between 'event.level.time' and 'event.level.dayTime()' ?

36 messages · Page 1 of 1 (latest)

acoustic summit
#

I'm trying to make an item that contains a function like daily reward from Fallout76, and I found out I can use event.level.time to confirm how many time was passed.
But it has a similar function 'event.level.dayTime()', it also return how many ticktime was passed, but smaller than the first one.
What function should I use if I want to make a daily reward ?

rain muskBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

mortal moat
#

seems more like a question for MMD, than kubejs

#

this is not part of kjs, its minecraft

acoustic summit
#

Both function ticktime passing speed seems was same.

acoustic summit
#

or is it exist kjs have a function that allow me to accessing system date?

mortal moat
#

im not sure i understand what youre saying

#

what wiki?

grizzled rover
#

event.level.time is gameTime, so you're basically asking if you should use gameTime or dayTime.... the difference is gameTime is the actual running time of that world, while dayTime can be manipulated by sleeping, so you want dayTime

acoustic summit
grizzled rover
#

dayTime is where the world actually is in the 24hr time cycle

mortal moat
#

there is no wiki for this lol

#

if only..

grizzled rover
#

I mean there sort of is.... the actual minecraft wiki

acoustic summit
#

what

mortal moat
#

xd

grizzled rover
#

yes as I said dayTime is the 24hr clock, gameTime is the whole time the server has been active

acoustic summit
#

thats more than 24000 in my image, weird

grizzled rover
#

oh the command just does dayTime%24000, whatever, doesn't matter lol

#

still based on what you want

acoustic summit
#

so they both will reset in some point?

grizzled rover
#

I'm going to keep saying it..... you need dayTime for what you want

#

they never reset

#

once again gameTime is how long the world has been active, it will never reset

#

sleeping will modify the time of day and therefore is the reason dayTime can not match gameTime

mortal moat
#

if you need more detail about it, again, this is not the place for it

oblique dewBOT
acoustic summit
#

ok, I see

#

dethonk ...and is it will stop counting when there was no player in server?

mortal moat
#

no, thats player age, not game time

grizzled rover
#

no, in a server situation (not single player) the world is always active, unless you have one of those mods or settings that puts the world to sleep

acoustic summit
#

thanks for answering me this, I think Im totally understand... ( is it? )

#

I will try it out later, for now I think I need to close this post.