aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-24 14:00:15 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-24 14:00:15 +0200
commit402e10596224a123dba780ab6ccaca36d80beb91 (patch)
tree9fba239c5958e52a5c32a1bb0d266819ca99dd0b /src/main
parent105fc8082a59f3bade7a7cf560a9d27c521b4f30 (diff)
downloadskyhanni-402e10596224a123dba780ab6ccaca36d80beb91.tar.gz
skyhanni-402e10596224a123dba780ab6ccaca36d80beb91.tar.bz2
skyhanni-402e10596224a123dba780ab6ccaca36d80beb91.zip
using exactLocation for visitor text
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
index 1466d7472..a49a282a7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
@@ -18,6 +18,7 @@ import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.RenderUtils.drawString
+import at.hannibal2.skyhanni.utils.RenderUtils.exactLocation
import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
@@ -317,14 +318,16 @@ class GardenVisitorFeatures {
if (config.visitorHighlightStatus != 1 && config.visitorHighlightStatus != 2) return
for (visitor in visitors.values) {
- visitor.getNameTagEntity()?.getLorenzVec()?.let {
+ visitor.getNameTagEntity()?.let {
+ val location = event.exactLocation(it)
if (it.distanceToPlayer() < 15) {
val text = visitor.status.displayName
- event.drawString(it.add(0.0, 2.23, 0.0), text)
+ event.drawString(location.add(0.0, 2.23, 0.0), text)
if (config.visitorRewardWarning.showOverName) {
visitor.hasReward()?.let { reward ->
val name = reward.displayName
- event.drawString(it.add(0.0, 2.73, 0.0), "§c!$name§c!")
+
+ event.drawString(location.add(0.0, 2.73, 0.0), "§c!$name§c!")
}
}
}