You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/kotlin/com/lambda/module/modules/player/AutoArmor.kt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ object AutoArmor : Module(
49
49
) {
50
50
privatevar elytraPriority by setting("Elytra Priority", true, "Prioritizes elytra's over other armor pieces in the chest slot")
51
51
privateval toggleElytraPriority by setting("Toggle Elytra Priority", Bind.EMPTY)
52
-
privateval minDurabilityPercentage by setting("Min Durability Percentage", 5, 0..100, 1, "Minimum durability percentage before being swapped for a new piece")
52
+
privateval minDurabilityPercentage by setting("Min Durability", 5, 0..100, 1, "Minimum durability percentage before being swapped for a new piece", "%")
53
53
privateval headProtection by setting("Preferred Head Protection", Protection.Protection)
54
54
privateval chestProtection by setting("Preferred Chest Protection", Protection.Protection)
55
55
privateval legProtection by setting("Preferred Leg Protection", Protection.BlastProtection)
description = "Moves tools from your hotbar into your inventory when they get too damaged",
38
+
ModuleTag.PLAYER
39
+
) {
40
+
privateval minDurabilityPercentage by setting("Min Durability", 5, 0..100, 1, "Minimum durability percentage before being swapped for a new piece", "%")
41
+
privateval replace by setting("Replace", true, "Replaces the tool with the one of the same kind")
42
+
43
+
init {
44
+
setDefaultAutomationConfig {
45
+
applyEdits {
46
+
hideAllGroupsExcept(inventoryConfig)
47
+
}
48
+
}
49
+
50
+
listen<TickEvent.Pre> {
51
+
val endangeredStacks = player.hotbarSlots.filter { it.stack.isEndangered }
52
+
53
+
val inventorySlots = player.inventorySlots
54
+
val swaps = endangeredStacks
55
+
.mapNotNull { endangered ->
56
+
val sorter = compareByDescending<Slot> { swapSlot ->
0 commit comments