We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d047cb commit 88c08c6Copy full SHA for 88c08c6
src/main/kotlin/com/lambda/module/modules/player/AutoArmor.kt
@@ -67,8 +67,11 @@ object AutoArmor : Module(
67
val armorSlots = player.armorSlots
68
69
val sorter = compareByDescending<Slot> {
70
- if (it.stack.damage.toFloat() / it.stack.maxDamage < 1 - (minDurabilityPercentage.toFloat() / 100)) Double.MIN_VALUE
71
- else if (elytraPriority) {
+ if (it.stack.isDamageable && 1 - (it.stack.damage.toFloat() / it.stack.maxDamage) < minDurabilityPercentage.toFloat() / 100)
+ -Double.MAX_VALUE
72
+ else 0.0
73
+ }.thenByDescending {
74
+ if (elytraPriority) {
75
if (it.stack.item == Items.ELYTRA) 1.0
76
else 0.0
77
} else 0.0
0 commit comments