From cb0f62d90fce450ea5b663feb2df36b5998d959e Mon Sep 17 00:00:00 2001 From: HiZe_ Date: Thu, 3 Aug 2023 15:57:43 +0200 Subject: Merge pull request #356 * fixed killer spring highlight even when turned off --- .../features/rift/VampireSlayerFeatures.kt | 29 ++++++++++------------ 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/rift') diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/VampireSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/VampireSlayerFeatures.kt index f5b85b1ba..41b6a3ea9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/VampireSlayerFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/VampireSlayerFeatures.kt @@ -33,6 +33,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.milliseconds object VampireSlayerFeatures { + private val config get() = SkyHanniMod.feature.slayer.vampireSlayerConfig private val configOwnBoss get() = config.ownBoss private val configOtherBoss get() = config.othersBoss @@ -284,26 +285,13 @@ object VampireSlayerFeatures { } } } - - if (configBloodIcor.renderBeam) { - entityList.filterIsInstance().forEach { - if (it.hasSkullTexture(bloodIchorTexture)) { - if (it.isEntityAlive) { - event.drawWaypointFilled( - it.position.toLorenzVec().add(0, -2, 0), configBloodIcor.color.toChromaColor(), - beacon = true - ) - } - } - } - } if (configBloodIcor.highlight || configKillerSpring.highlight) { Minecraft.getMinecraft().theWorld.loadedEntityList.filterIsInstance().forEach { stand -> val vec = stand.position.toLorenzVec() val distance = start.distance(vec) val isIchor = stand.hasSkullTexture(bloodIchorTexture) val isSpring = stand.hasSkullTexture(killerSpringTexture) - if (isIchor || isSpring) { + if ((isIchor && config.bloodIchor.highlight) || (isSpring && config.killerSpring.highlight)) { val color = (if (isIchor) configBloodIcor.color else configKillerSpring.color) .toChromaColor().withAlpha(config.withAlpha) if (distance <= 15) { @@ -317,16 +305,25 @@ object VampireSlayerFeatures { event.drawColor(stand.position.toLorenzVec().add(0.0, 2.0, 0.0), LorenzColor.DARK_RED, alpha = 1f) event.drawDynamicText(stand.position.toLorenzVec().add(0.5, 2.5, 0.5), text, 1.5, ignoreBlocks = false) for ((player, stand2) in standList) { - if (configBloodIcor.showLines || configKillerSpring.showLines) + if ((configBloodIcor.showLines && isIchor) || (configKillerSpring.showLines && isSpring)) event.draw3DLine( event.exactLocation(player).add(0.0, 1.5, 0.0), event.exactLocation(stand2).add(0.0, 1.5, 0.0), - // stand2.position.toLorenzVec().add(0.0, 1.5, 0.0), + // stand2.position.toLorenzVec().add(0.0, 1.5, 0.0), linesColorStart, 3, true) } } + if (configBloodIcor.renderBeam && isIchor) { + if (stand.isEntityAlive) { + event.drawWaypointFilled( + event.exactLocation(stand).add(0, -2, 0), + configBloodIcor.color.toChromaColor(), + beacon = true + ) + } + } } } } -- cgit