diff options
author | Brandon <brandon.wamboldt@gmail.com> | 2023-12-08 11:36:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-08 16:36:38 +0100 |
commit | 4fa9b95a280515b1fa71425e8e1c61d5b4a009f6 (patch) | |
tree | c723592ca9ac1fe8b78db84c4b9ff0025da6c7b5 /src/main/java/at/hannibal2/skyhanni/features/fishing | |
parent | d56e3075c7d418e0004f072703e635e83e2a06cf (diff) | |
download | skyhanni-4fa9b95a280515b1fa71425e8e1c61d5b4a009f6.tar.gz skyhanni-4fa9b95a280515b1fa71425e8e1c61d5b4a009f6.tar.bz2 skyhanni-4fa9b95a280515b1fa71425e8e1c61d5b4a009f6.zip |
Fix duplicate water hydra catch title, add shadows to titles (#749)
Better looking titles, added test command /shsendtitle and fixed Water Hydra warning showing up multiple times. #749
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/fishing')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt index da0d9a950..cdb990afe 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt @@ -15,6 +15,7 @@ import at.hannibal2.skyhanni.utils.EntityUtils.hasNameTagWith import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.LorenzUtils.baseMaxHealth import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.SoundUtils @@ -50,9 +51,11 @@ class SeaCreatureFeatures { RenderLivingEntityHelper.setEntityColor(entity, LorenzColor.RED.toColor().withAlpha(50)) { config.highlight } RenderLivingEntityHelper.setNoHurtTime(entity) { config.highlight } + + if (creatureType == RareSeaCreatureType.WATER_HYDRA && entity.health == (entity.baseMaxHealth.toFloat() / 2)) continue; // Water hydra splitting in two if (config.alertOtherCatches && lastRareCatch.passedSince() > 1.seconds) { val creature = SeaCreatureManager.allFishingMobs[creatureType.nametag] - TitleManager.sendTitle("${creature?.rarity?.chatColorCode ?: "§6"}RARE SEA CREATURE!", 1.5.seconds, 3.6) + TitleManager.sendTitle("${creature?.rarity?.chatColorCode ?: "§6"}RARE SEA CREATURE!", 1.5.seconds, 3.6, 7.0) if (config.playSound) SoundUtils.playBeepSound() } } @@ -64,7 +67,7 @@ class SeaCreatureFeatures { if (!config.alertOwnCatches) return if (event.seaCreature.rare) { - TitleManager.sendTitle("${event.seaCreature.rarity.chatColorCode}RARE CATCH!", 3.seconds, 3.6) + TitleManager.sendTitle("${event.seaCreature.rarity.chatColorCode}RARE CATCH!", 3.seconds, 2.8, 7.0) if (config.playSound) SoundUtils.playBeepSound() lastRareCatch = SimpleTimeMark.now() } |