Skip to content

Commit

Permalink
Re-added logic to account for time skips (#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
lanAnderson authored Jun 1, 2024
1 parent 1298f8e commit e277f70
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/src/main/java/sereneseasons/season/SeasonHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ public static void onLevelTick(TickEvent.Level event)
if (difference == 0)
return;

if (difference < 0)
{
difference += 24000L;
}

SeasonSavedData savedData = getSeasonSavedData(level);
savedData.seasonCycleTicks = Mth.positiveModulo(savedData.seasonCycleTicks + (int)difference, SeasonTime.ZERO.getCycleDuration());

Expand Down

0 comments on commit e277f70

Please sign in to comment.