From d060394ccd00fbe3a86481db939032e13ca458b2 Mon Sep 17 00:00:00 2001 From: Lorenz Date: Tue, 23 Aug 2022 13:16:57 +0200 Subject: showing the name of ashfang gravity orbs tag above --- .../java/at/hannibal2/skyhanni/features/SummoningSoulsName.kt | 10 +++++----- .../skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt | 9 ++++++--- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') diff --git a/src/main/java/at/hannibal2/skyhanni/features/SummoningSoulsName.kt b/src/main/java/at/hannibal2/skyhanni/features/SummoningSoulsName.kt index 13900555e..1f0144620 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/SummoningSoulsName.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/SummoningSoulsName.kt @@ -2,9 +2,12 @@ package at.hannibal2.skyhanni.features import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.test.GriffinJavaUtils -import at.hannibal2.skyhanni.utils.* import at.hannibal2.skyhanni.utils.ItemUtils.getSkullTexture +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.RenderUtils.drawString +import at.hannibal2.skyhanni.utils.getLorenzVec +import at.hannibal2.skyhanni.utils.getNameTagWith import net.minecraft.client.Minecraft import net.minecraft.entity.EntityLiving import net.minecraft.entity.item.EntityArmorStand @@ -94,12 +97,9 @@ class SummoningSoulsName { fun onWorldRender(event: RenderWorldLastEvent) { if (!isEnabled()) return - val playerLocation = LocationUtils.playerEyeLocation() for ((entity, name) in souls) { val vec = entity.getLorenzVec() - if (LocationUtils.canSee(playerLocation, vec.add(0.0, 2.0, 0.0))) { - event.drawString(vec.add(0.0, 2.5, 0.0), name, true) - } + event.drawString(vec.add(0.0, 2.5, 0.0), name) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt index 11a6f5f2a..ed1abeacb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.ItemUtils.getSkullTexture import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.RenderUtils.drawString import at.hannibal2.skyhanni.utils.SpecialColour import at.hannibal2.skyhanni.utils.getLorenzVec import net.minecraft.client.Minecraft @@ -40,13 +41,15 @@ class AshfangGravityOrbs { val color = Color(SpecialColour.specialToChromaRGB(special), true) - val playerEyeLocation = LocationUtils.playerEyeLocation() + val playerLocation = LocationUtils.playerLocation() for (orb in orbs) { if (orb.isDead) continue val orbLocation = orb.getLorenzVec() - if (!LocationUtils.canSee(playerEyeLocation, orbLocation.add(0.0, 2.0, 0.0))) continue - event.drawWaypointFilled(orbLocation.add(-0.5, 1.25, -0.5), color) + if (orbLocation.distance(playerLocation) < 15) { + //TODO find way to dynamically change color + event.drawString(orbLocation.add(0.0, 2.5, 0.0), "§cGravity Orb") + } } } -- cgit