diff options
author | My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> | 2020-12-24 18:46:42 -0500 |
---|---|---|
committer | My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> | 2020-12-24 18:46:42 -0500 |
commit | d3fd640af8a50cfe36a01d294683f5340e008e41 (patch) | |
tree | 40e9183f39586a3b794db755b9de40b81d771b6b /src/main/java/me/Danker | |
parent | e550f99b8d93ddaec54d1e9273ad5121976d7098 (diff) | |
download | SkyblockMod-d3fd640af8a50cfe36a01d294683f5340e008e41.tar.gz SkyblockMod-d3fd640af8a50cfe36a01d294683f5340e008e41.tar.bz2 SkyblockMod-d3fd640af8a50cfe36a01d294683f5340e008e41.zip |
update skyblock year detection
Diffstat (limited to 'src/main/java/me/Danker')
-rw-r--r-- | src/main/java/me/Danker/DankersSkyblockMod.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 37dd773..40db55a 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -615,8 +615,12 @@ public class DankersSkyblockMod { if (ToggleCommand.oruoToggled && Utils.inDungeons) { if (message.contains("What SkyBlock year is it?")) { - int year = (int) (Math.floor((System.currentTimeMillis() - 1560276000000L)/446400) + 1); + double currentTime = System.currentTimeMillis() /1000L; + double diff = Math.floor(currentTime - 1560276000); + + int year = (int) (diff / 446400 + 1); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("It is Skyblock Year " + year)); triviaAnswers = new String[]{"Year " + year}; } else { for (String question : triviaSolutions.keySet()) { |