Day resets when sleeping in tent
androshalforc opened this issue ยท 2 comments
so im not sure if this is an issue with nomadic tents or some other mod
im playing with at least one mod that does something with moon phases,
ive noticed that when sleeping in a tent the moon phase the following night is always the same as the previous night, im not sure if this is an issue with the mod or something about sleeping in an other dimension.
i did not have this issue until i moved my bed inside a tent and started sleeping there instead of the overworld
EDIT
after some further testing the problem is not that the week resets but that the day resets
sleeping in a bed outside the tent causes the day/week cycle to progress normally while sleeping inside the tent causes the 'groundhog day' effect of repeating the same day over and over
This is the code I use when a player sleeps in the tent dimension:
long currentTime = overworld.getWorldInfo().getWorldTime();
overworld.getWorldInfo().setWorldTime(currentTime - currentTime % 24000L);
It looks like my math is subtracting the current day time from the total world time, which would result in the same day starting over at 0.
I'm guessing since you reported it, you'd like for this behavior to work differently. Should I be skipping forward to the next day?
it would make sense if it moved forward to the following day rather then repeating the same day.
while vanilla minecraft does not care what day it is afaik there are at least a couple of mods that im aware of that take the phase of the moon into account, and im sure there are other things that im not aware of that do as well.