diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-08-23 21:28:33 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-08-23 21:28:33 +0200 |
commit | d1ee14065e1eafd1e0679bf4290087947d9564bd (patch) | |
tree | 014137b0951fcf057d19b36df1d062db9351e5ac /src/main/java/at/hannibal2 | |
parent | 22cb7698523cd83d827efc3e879e180ac959c305 (diff) | |
download | skyhanni-d1ee14065e1eafd1e0679bf4290087947d9564bd.tar.gz skyhanni-d1ee14065e1eafd1e0679bf4290087947d9564bd.tar.bz2 skyhanni-d1ee14065e1eafd1e0679bf4290087947d9564bd.zip |
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt | 13 |
1 files changed, 6 insertions, 7 deletions
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 |