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
This setting helps you mend items while being AFK (made thinking about
AFK fishing) by replacing the offhand item with low HP items of the
same type that have the mending enchantment.
privateval radius by setting("Radius", 64, 8..128, 8, fineStep =1)
43
49
privateval inputTimeout by setting("Idle Timeout", 0, 0..15, 1, description ="Starts AntiAFK after being idle longer than the selected time in minutes, 0 to disable", unit ="m")
44
50
privateval allowBreak by setting("Allow Breaking Blocks", false, { walk.value })
51
+
privateval helpMend by setting("Help Mend", false, description ="Helps mending items by replacing the offhand item with low HP items of the same type")
45
52
46
53
privatevar startPos:BlockPos?=null
47
54
privatevar squareStep =0
@@ -123,6 +130,14 @@ object AntiAFK : Module(
123
130
safeListener<TickEvent.ClientTickEvent> {
124
131
if (it.phase !=TickEvent.Phase.END) return@safeListener
125
132
133
+
if (helpMend && (player.heldItemOffhand.itemDamage ==0||EnchantmentHelper.getEnchantmentLevel(Enchantments.MENDING, player.heldItemOffhand) ==0)) {
134
+
val chosenItemSlots = player.inventorySlots.filter{it.stack.item.equals(player.heldItemOffhand.item) &&EnchantmentHelper.getEnchantmentLevel(Enchantments.MENDING, it.stack) !=0&& it.stack.itemDamage !=0}
135
+
if (chosenItemSlots.isNotEmpty()) {
136
+
MessageSendHelper.sendChatMessage("$chatName Switching offhand to another item as it has max HP (Help Mend).")
0 commit comments