aboutsummaryrefslogtreecommitdiff
path: root/me/Danker/commands
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-07-27 16:47:26 -0400
committerbowser0000 <bowser0000@gmail.com>2020-07-27 16:47:26 -0400
commit872799a67524437e39f785ec27ab85d708154e65 (patch)
treefadd2cdbe6911fabf39b713343546ec0f4ea1dc5 /me/Danker/commands
parent82a8c9b7f800f4fdcbb20e86ae125cda4dd6631d (diff)
downloadSkyblockMod-872799a67524437e39f785ec27ab85d708154e65.tar.gz
SkyblockMod-872799a67524437e39f785ec27ab85d708154e65.tar.bz2
SkyblockMod-872799a67524437e39f785ec27ab85d708154e65.zip
Change RNG timestamp from int to doublev1.5.4
Diffstat (limited to 'me/Danker/commands')
-rw-r--r--me/Danker/commands/LootCommand.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/me/Danker/commands/LootCommand.java b/me/Danker/commands/LootCommand.java
index e61fde7..4e26287 100644
--- a/me/Danker/commands/LootCommand.java
+++ b/me/Danker/commands/LootCommand.java
@@ -20,7 +20,7 @@ public class LootCommand extends CommandBase {
public static int wolfCoutures;
public static int wolfBaits;
public static int wolfFluxes;
- public static int wolfTime;
+ public static double wolfTime;
public static int wolfBosses;
// Spider
public static int spiderTarantulas;
@@ -32,7 +32,7 @@ public class LootCommand extends CommandBase {
public static int spiderSwatters;
public static int spiderTalismans;
public static int spiderMosquitos;
- public static int spiderTime;
+ public static double spiderTime;
public static int spiderBosses;
// Zombie
public static int zombieRevs;
@@ -45,11 +45,11 @@ public class LootCommand extends CommandBase {
public static int zombieRevCatas;
public static int zombieSnakes;
public static int zombieScythes;
- public static int zombieTime;
+ public static double zombieTime;
public static int zombieBosses;
- public String getTimeBetween(int timeOne, int timeTwo) {
- int secondsBetween = timeTwo - timeOne;
+ public String getTimeBetween(double timeOne, double timeTwo) {
+ double secondsBetween = Math.floor(timeTwo - timeOne);
String timeFormatted = "";
int days;
@@ -59,18 +59,18 @@ public class LootCommand extends CommandBase {
if (secondsBetween > 86400) {
// More than 1d, display #d#h
- days = secondsBetween / 86400;
- hours = secondsBetween % 86400 / 3600;
+ days = (int) (secondsBetween / 86400);
+ hours = (int) (secondsBetween % 86400 / 3600);
timeFormatted = days + "d" + hours + "h";
} else if (secondsBetween > 3600) {
// More than 1h, display #h#m
- hours = secondsBetween / 3600;
- minutes = secondsBetween % 3600 / 60;
+ hours = (int) (secondsBetween / 3600);
+ minutes = (int) (secondsBetween % 3600 / 60);
timeFormatted = hours + "h" + minutes + "m";
} else {
// Display #m#s
- minutes = secondsBetween / 60;
- seconds = secondsBetween % 60;
+ minutes = (int) (secondsBetween / 60);
+ seconds = (int) (secondsBetween % 60);
timeFormatted = minutes + "m" + seconds + "s";
}
@@ -101,7 +101,7 @@ public class LootCommand extends CommandBase {
return;
}
- int timeNow = (int) System.currentTimeMillis() / 1000;
+ double timeNow = System.currentTimeMillis() / 1000;
String timeBetween;
String bossesBetween;
if (arg1[0].equalsIgnoreCase("wolf")) {