fix moon phase calculation on very very very (fake) old worlds

This commit is contained in:
Bixilon 2023-06-24 01:06:51 +02:00
parent 51d4a31e6c
commit 18798f6de6
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -25,7 +25,7 @@ class WorldTime(
val age = abs(age) val age = abs(age)
val moonPhase = MoonPhases[this.age.toInt() / ProtocolDefinition.TICKS_PER_DAY % MoonPhases.VALUES.size] // ToDo: Verify val moonPhase = MoonPhases[(this.age / ProtocolDefinition.TICKS_PER_DAY % MoonPhases.VALUES.size).toInt()] // ToDo: Verify
val phase = DayPhases.of(this.time) val phase = DayPhases.of(this.time)
val progress = phase.getProgress(this.time) val progress = phase.getProgress(this.time)