From d1ee14065e1eafd1e0679bf4290087947d9564bd Mon Sep 17 00:00:00 2001 From: Lorenz Date: Tue, 23 Aug 2022 21:28:33 +0200 Subject: code cleanup --- .../at/hannibal2/skyhanni/features/minion/MinionFeatures.kt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt index f88f23772..1d3667e2e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt @@ -144,14 +144,16 @@ class MinionFeatures { if (LorenzUtils.skyBlockIsland != "Private Island") return val playerLocation = LocationUtils.playerLocation() + var playerEyeLocation = LocationUtils.playerEyeLocation() for (minion in minions) { val location = minion.key if (playerLocation.distance(location) < SkyHanniMod.feature.minions.emptiedTimeDistance) { val duration = System.currentTimeMillis() - minion.value val format = StringUtils.formatDuration(duration / 1000) - - val text = "§eHopper Emptied: $format" - event.drawString(location.add(0.0, 2.0, 0.0), text) + if (LocationUtils.canSee(playerEyeLocation, location)) { + val text = "§eHopper Emptied: $format" + event.drawString(location.add(0.0, 2.0, 0.0), text, true) + } } } } @@ -164,7 +166,6 @@ class MinionFeatures { val entity = event.entity if (entity !is EntityArmorStand) return -// if (entity.ticksExisted > 300 || entity !is EntityArmorStand) return if (!entity.hasCustomName()) return if (entity.isDead) return @@ -175,6 +176,4 @@ class MinionFeatures { } } } -} - -// \ No newline at end of file +} \ No newline at end of file -- cgit