5 Commits
main ... v1.4.1

Author SHA1 Message Date
Jack
9b34da0fdf change version to 1.4.1 2024-08-06 21:28:00 -04:00
Jack
51664841a6 forgot to update line 164... (my bad) 2024-08-06 21:25:30 -04:00
Jack
ae32363e0f Port fix in #12 to legacy 2024-08-06 21:12:54 -04:00
Jack
b1cc12ba85 Merge pull request #9 from Jack1424/main
Add v1.4.0 changes to legacy
2024-07-23 18:10:08 -04:00
Jack
5a48428057 update README.md with legacy information 2024-06-28 18:07:47 -04:00
3 changed files with 11 additions and 8 deletions

View File

@@ -2,6 +2,11 @@
[![Build Status](https://app.travis-ci.com/Jack1424/RealTimeWeather.svg?branch=master)](https://app.travis-ci.com/Jack1424/RealTimeWeather)
### A lightweight Minecraft server plugin that allows you to sync your server's time and weather with the real world
## ⚠️ This is the legacy branch of RealTimeWeather ⚠️
**Only use legacy versions of RealTimeWeather (v1.x.x) if you NEED support for older versions of Minecraft.**
**If you don't need support for versions older than the most recent versions of Minecraft, don't use the legacy versions of this plugin.**
Legacy versions of RealTimeWeather will not receive as many (if any) updates.
___
**Current Features:**
- Lightweight
@@ -12,15 +17,13 @@ ___
**Upcoming Features:**
- [ ] Commands
- [ ] Multi-world support
- [ ] Folia support
## Installation
Just download the [latest version](https://github.com/Jack1424/RealTimeWeather/releases/latest) of RTW and put it in your `plugins` directory.
Just download the [latest version](https://github.com/Jack1424/RealTimeWeather/releases/) of **a legacy version** of RTW **(legacy versions are any version that starts with v1)** and put it in your `plugins` directory.
You'll need to run your server at least once to generate the configuration file.
After running (and then stopping) your server, simply change the values in the configuration file to what you'd like, and you're good to go.
## Contributions/Support
I'm open to any help/ideas that you have. Just open an issue or a pull request, and I'll be sure to look at it as soon as I can. Builds with `gradlew shadowJar`.
**Legacy versions won't receive as many (if any) updates**, but I'm open to any help/ideas that you have. Just open an issue or a pull request, and I'll be sure to look at it as soon as I can. Builds with `gradlew shadowJar`.
License: GPL-3.0

View File

@@ -4,7 +4,7 @@ plugins {
}
group = 'io.github.Jack1424'
version = '1.4.0'
version = '1.4.1'
repositories {
mavenCentral()

View File

@@ -161,15 +161,15 @@ public final class RealTimeWeather extends JavaPlugin {
sunsetMinutes += 720;
LocalTime currentTime = LocalTime.of(cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));
int currentMinutes = currentTime.getHour() * 60 + currentTime.getMinute();
double currentMinutes = currentTime.getHour() * 60 + currentTime.getMinute();
if (currentMinutes >= sunriseMinutes && currentMinutes < sunsetMinutes) {
return ((currentMinutes - sunriseMinutes) / (sunsetMinutes - sunriseMinutes) * 13569) + 23041;
return (long) (((currentMinutes - sunriseMinutes) / (sunsetMinutes - sunriseMinutes)) * 13569) + 23041;
} else {
if (currentMinutes < sunriseMinutes)
currentMinutes += 1440;
return ((currentMinutes - sunsetMinutes) / (1440 - sunsetMinutes + sunriseMinutes) * 13569) + 12610;
return (long) (((currentMinutes - sunsetMinutes) / (1440 - sunsetMinutes + sunriseMinutes)) * 13569) + 12610;
}
}