TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Daily temperature is lower at noon and higher at midnight

Leinourdian opened this issue ยท 1 comments

commented

Describe the bug

  1. What did you expect to happen?
    In debug mode I'd expect the "Daily" temperature to be highest at noon and lowest at midnight. This would make intuitive sense as generally temperature is higher during the day IRL.

  2. What actually happened instead (i.e. what was the bug)
    Instead, the "Daily" temperature is highest at midnight and lowest at noon. I think this might lead to unintuitive situations where ice can melt at night.

2020-04-14_22 25 27
2020-04-14_22 29 48

To Reproduce
Make sure debug mode is on so you can see the "Daily" temperature. Press F3 and see how the "Daily" temperature changes with time of day.

Meta Info

  • TFC Version: 1.0.1.128
  • No other mods were included.

To Fix
I think this is caused by a simple math error over here:

float hourModifier = 1f - (hourOfDay / 6f);

I think it should read like this instead:
float hourModifier = (hourOfDay / 6f) - 1f;

commented

Lovely, thanks. I've been known for messing up some of those damn formulas before :P