Tough As Nails

Tough As Nails

21M Downloads

change how the game keeps track of seasons

EnderiumSmith opened this issue ยท 6 comments

commented

the current way of keeping track of seasons is buggy and will break after ~200 days

minecraft already has a timer that tracks the time passed and can be seen in F3 and since a vanilla timer wont break, it should be used to track the seasons instead of what is now used.

% dividing it by the number of days in a year should result in the current day of the year.

and yes /time set will change the season this way

Also the number of days in a month should be configurable. multiply by 12 to get the number of days in a year. that way the player cant insert an invalid number of days in a year.

a config to disable plant frostbite is also a good idea.

commented

No, this is not a viable solution. Beds are intended to move seasons forward, whilst the timer you're referring to does not change when sleeping. This is why we switched to the current setup to begin with.

commented

@Adubbz not true. sleeping in bed does advance the timer. the command /time set night resets it back to 0 so that might be why you didnt see it.

press F3 and you will see the value increase. use /time add

commented

Minecraft keeps track of only two values (see WorldInfo), the time of the day and the total world time. The time of the day is reset when all players are sleeping as per the following code in WorldServer:

    if (this.areAllPlayersAsleep())
    {
        if (this.getGameRules().getBoolean("doDaylightCycle"))
        {
            long i = this.worldInfo.getWorldTime() + 24000L;
            this.worldInfo.setWorldTime(i - i % 24000L);
        }

        this.wakeAllPlayers();
    }

Hence, this leaves us with the total time, which is not in any way touched by beds and we should not be altering it ourselves.

Additionally, this time you're referring to on the F3 screen doesn't exist in Vanilla/Forge. http://minecraft.gamepedia.com/Debug_screen

commented

Since I wasn't exactly clear, though it is also true that the time of day value may exceed 0 to 24000, this functionality is mainly intended for use with moon phases, which are still in a bit of a messy state split across the client and server. Hence, Mojang may change the underlying code may change at any time, and for most purposes, sleeping is equivalent to resetting the clock. Additionally, we'll simply start seeing further complaints as players do not expect setting the time of day to also mess up seasons.

commented

As a sidenote, I do find it rather questionable to immediately jump to a completely different, and quite frankly more restrictive system with its own set of problems merely because it is built into the game. Such an approach should only be taken if an existing setup is fundamentally flawed, which whilst it may perhaps contain bugs, I don't think you've shown sufficient evidence of.

commented

its in the screenshot on the line with local difficulty. local difficulty uses it to be calculated.

most mods know to add to the time when changing time of day. a player in survival has no reason to mess with /time set

@Adubbz