aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FishingHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FishingHelper.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FishingHelper.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FishingHelper.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FishingHelper.java
index b43b0e78..8be03412 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FishingHelper.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FishingHelper.java
@@ -150,7 +150,18 @@ public class FishingHelper {
int ticksExisted = hook.ticksExisted;
float seconds = ticksExisted / 20F;
int color;
- if (seconds >= 20) {
+ float maxSlugTime = 20;
+ PetInfoOverlay.Pet pet = PetInfoOverlay.getCurrentPet();
+ if (NotEnoughUpdates.INSTANCE.config.fishing.enableSlugCheck && pet != null) {
+ if (pet.petLevel != null &&
+ pet.petType.equalsIgnoreCase("slug")
+ ) {
+ double slugFactor = 0.005 * pet.petLevel.getCurrentLevel();
+ maxSlugTime = (float) (maxSlugTime * (1 - slugFactor));
+ }
+ }
+
+ if (seconds >= maxSlugTime) {
color = ChromaColour.specialToChromaRGB(NotEnoughUpdates.INSTANCE.config.fishing.fishingTimerColor30SecPlus);
if (NotEnoughUpdates.INSTANCE.config.fishing.fishingSound30Sec && !playedSound) {
ISound sound = new PositionedSound(new ResourceLocation("random.orb")) {{