Error with time #11
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Have you searched the wiki and looked for existing issues for this?
What's happening
Hello. I am in the America/Chicago timezone. Even though right now it is about noon, the plugin seems to think that it is sunset? Not sure what to do here, i have debug mode on, and there are no errors in console. Also im running on paper and downloaded from modrinth (my browser couldn't use the drop down for whatever reason)
What's supposed to happen
The plugin would recognize its about noon and it would be daytime in game.
Server Software
Spigot
Minecraft version
1.20
Server log
No response
RTW configuration
No response
Additional information
No response
Heres my config: https://pastebin.com/2jJHku89
Thank you for letting me know. I'll look into this as soon as I can.
It may have something to do with daylight savings? I'm really not too sure
Looked into this myself and it seems to me these return lines have an issue with variable types.
int currentMinutes; long sunriseMinutes; long sunsetMinutes;
RealTimeWeather.java:167
return ((currentMinutes - sunriseMinutes) / (sunsetMinutes - sunriseMinutes) * 13569) + 23041;
RealTimeWeather.java:172
return ((currentMinutes - sunsetMinutes) / (1440 - sunsetMinutes + sunriseMinutes) * 13569) + 12610;
The result of the division is an integer(long?) type and thus only ever 0 or 1. I'd test throwing in a type cast to double, however I installed java today specifically for Minecraft and really don't feel like trying to figure out how to set up a build environment just for this.
looking forward to seeing this mod in action!