TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Version 1.18.x-2.2.10 DateTimeException when changing to January 1

jmdisher opened this issue ยท 0 comments

commented

I just noticed a crash when the in-game calendar switched to January 1:

java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
        at java.base/java.time.temporal.ValueRange.checkValidValue(ValueRange.java:319)
        at java.base/java.time.temporal.ChronoField.checkValidValue(ChronoField.java:718)
        at java.base/java.time.LocalDate.of(LocalDate.java:271)
        at TRANSFORMER/[email protected]/net.dries007.tfc.util.calendar.ServerCalendar.checkIfInTheFuture(ServerCalendar.java:247)
        at TRANSFORMER/[email protected]/net.dries007.tfc.util.calendar.ServerCalendar.onOverworldTick(ServerCalendar.java:240)
        at TRANSFORMER/[email protected]/net.dries007.tfc.util.calendar.CalendarEventHandler.onOverworldTick(CalendarEventHandler.java:80)
        at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247)
        at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239)
        at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
        at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
        at TRANSFORMER/[email protected]/net.minecraftforge.event.ForgeEventFactory.onPostWorldTick(ForgeEventFactory.java:911)
        at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:908)
        at TRANSFORMER/[email protected]/net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:326)
        at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:842)
        at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:685)
        at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:261)
        at java.base/java.lang.Thread.run(Thread.java:833)

This happens whether the night switches by waiting, sleeping, or using the time command to add 1 day from December 8.

At a cursory glance, this looks related to 4658124.

This bug does NOT exist in version 1.18.x-2.2.9 (I reverted to work around this).