diff options
author | hackthetime <l4bg0jb7@duck.com> | 2023-09-22 11:17:33 +0200 |
---|---|---|
committer | hackthetime <l4bg0jb7@duck.com> | 2023-09-22 11:17:33 +0200 |
commit | ac682a3b1d956ae209dfe4d4e9126bb2261f955e (patch) | |
tree | 0df000fe721abb3f871bd2907d39c8f32238c876 /src/main/java/de/hype/bbsentials/communication | |
parent | f30090beaa3f116ec3fcbe103fc72a393e5f9162 (diff) | |
download | BBsentials-ac682a3b1d956ae209dfe4d4e9126bb2261f955e.tar.gz BBsentials-ac682a3b1d956ae209dfe4d4e9126bb2261f955e.tar.bz2 BBsentials-ac682a3b1d956ae209dfe4d4e9126bb2261f955e.zip |
bug fixes, renamings, variable additions,...
Diffstat (limited to 'src/main/java/de/hype/bbsentials/communication')
-rw-r--r-- | src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java b/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java index 4a8fb50..8df4fc5 100644 --- a/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java +++ b/src/main/java/de/hype/bbsentials/communication/BBsentialConnection.java @@ -49,14 +49,14 @@ public class BBsentialConnection { } public static int getPotTime() { - int remainingTimeInMinutes = 0; + int remainingDuration = 0; StatusEffectInstance potTimeRequest = MinecraftClient.getInstance().player.getStatusEffect(StatusEffects.STRENGTH); if (potTimeRequest != null) { if (potTimeRequest.getAmplifier() >= 7) { - remainingTimeInMinutes = (int) (potTimeRequest.getDuration() / 20.0); + remainingDuration = (int) (potTimeRequest.getDuration() / 20.0); } } - return remainingTimeInMinutes; + return remainingDuration; } public static boolean isCommandSafe(String command) { @@ -345,7 +345,7 @@ public class BBsentialConnection { public void onSplashNotifyPacket(SplashNotifyPacket packet) { int waitTime; if (packet.lessWaste) { - waitTime = (getPotTime() * 1000) / 80; + waitTime = Math.min(((getPotTime() * 1000) / 80),25*1000); } else { waitTime = 0; |