From d3fd640af8a50cfe36a01d294683f5340e008e41 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 24 Dec 2020 18:46:42 -0500 Subject: update skyblock year detection --- src/main/java/me/Danker/DankersSkyblockMod.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main') 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()) { -- cgit