File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
common/src/main/kotlin/com/lambda Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import com.lambda.interaction.request.rotation.Rotation.Companion.dist
2424import com.lambda.interaction.request.rotation.Rotation.Companion.rotation
2525import com.lambda.interaction.request.rotation.Rotation.Companion.rotationTo
2626import com.lambda.threading.runSafe
27+ import com.lambda.util.extension.fullHealth
2728import com.lambda.util.math.distSq
2829import com.lambda.util.world.fastEntitySearch
2930import net.minecraft.client.network.ClientPlayerEntity
@@ -201,7 +202,7 @@ abstract class Targeting(
201202 /* *
202203 * Prioritizes entities based on their health.
203204 */
204- HEALTH ({ it.health.toDouble() }),
205+ HEALTH ({ it.fullHealth }),
205206
206207 /* *
207208 * Prioritizes entities based on their angle relative to the player's field of view.
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import com.lambda.threading.runConcurrent
3131import com.lambda.util.Communication.warn
3232import com.lambda.util.Nameable
3333import com.lambda.util.extension.dimensionName
34+ import com.lambda.util.extension.fullHealth
3435import com.lambda.util.extension.worldName
3536import dev.cbyrne.kdiscordipc.KDiscordIPC
3637import dev.cbyrne.kdiscordipc.core.packet.inbound.impl.AuthenticatePacket
@@ -113,7 +114,7 @@ object Discord : Module(
113114 VERSION ({ Lambda .VERSION }),
114115 WORLD ({ worldName }),
115116 USERNAME ({ mc.session.username }),
116- HEALTH ({ " ${player.health } HP" }),
117+ HEALTH ({ " ${player.fullHealth } HP" }),
117118 HUNGER ({ " ${player.hungerManager.foodLevel} Hunger" }),
118119 DIMENSION ({ dimensionName }),
119120 FPS ({ " ${mc.currentFps} FPS" });
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import com.lambda.util.Communication.prefix
3030import com.lambda.util.Formatting.string
3131import com.lambda.util.combat.CombatUtils.hasDeadlyCrystal
3232import com.lambda.util.combat.DamageUtils.isFallDeadly
33+ import com.lambda.util.extension.fullHealth
3334import com.lambda.util.player.SlotUtils.combined
3435import com.lambda.util.text.*
3536import com.lambda.util.world.fastEntitySearch
@@ -154,7 +155,7 @@ object AutoDisconnect : Module(
154155 literal(" on " )
155156 highlighted(Communication .currentTime())
156157 literal(" with " )
157- highlighted(player.health .string)
158+ highlighted(player.fullHealth .string)
158159 literal(" health." )
159160 if (player.isSubmergedInWater) {
160161 literal(" \n " )
@@ -184,10 +185,10 @@ object AutoDisconnect : Module(
184185
185186 enum class Reason (val check : () -> Boolean , val generateReason : SafeContext .() -> Text ? ) {
186187 HEALTH ({ health }, {
187- if (player.health < minimumHealth) {
188+ if (player.fullHealth < minimumHealth) {
188189 buildText {
189190 literal(" Health " )
190- highlighted(player.health .string)
191+ highlighted(player.fullHealth .string)
191192 literal(" below minimum of " )
192193 highlighted(" $minimumHealth " )
193194 literal(" !" )
You can’t perform that action at this time.
0 commit comments