From 4fa9b95a280515b1fa71425e8e1c61d5b4a009f6 Mon Sep 17 00:00:00 2001 From: Brandon Date: Fri, 8 Dec 2023 11:36:38 -0400 Subject: 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 --- .../at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/fishing') 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() } -- cgit