diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/combat/AutoOffhand.java b/src/main/java/me/zeroeightsix/kami/module/modules/combat/AutoTotem.java similarity index 94% rename from src/main/java/me/zeroeightsix/kami/module/modules/combat/AutoOffhand.java rename to src/main/java/me/zeroeightsix/kami/module/modules/combat/AutoTotem.java index b013c252..55d65510 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/combat/AutoOffhand.java +++ b/src/main/java/me/zeroeightsix/kami/module/modules/combat/AutoTotem.java @@ -15,11 +15,11 @@ import static me.zeroeightsix.kami.module.modules.gui.InfoOverlay.getItems; * Created by 086 on 22/01/2018. * Updated by S-B99 on 25/03/20 */ -@Module.Info(name = "AutoOffhand", category = Module.Category.COMBAT, description = "Refills your offhand with totems or other items") -public class AutoOffhand extends Module { +@Module.Info(name = "AutoTotem", category = Module.Category.COMBAT, description = "Refills your offhand with totems or other items") +public class AutoTotem extends Module { private Setting modeSetting = register(Settings.e("Mode", Mode.REPLACE_OFFHAND)); - private Setting smartOffhand = register(Settings.booleanBuilder("Custom Item").withValue(false).withVisibility(v -> modeSetting.getValue().equals(Mode.REPLACE_OFFHAND))); - private Setting healthSetting = register(Settings.doubleBuilder("Custom Item Health").withValue(14.0).withVisibility(v -> smartOffhand.getValue() && modeSetting.getValue().equals(Mode.REPLACE_OFFHAND))); + private Setting smartOffhand = register(Settings.booleanBuilder("Custom Item").withValue(false).withVisibility(v -> modeSetting.getValue().equals(Mode.REPLACE_OFFHAND)).build()); + private Setting healthSetting = register(Settings.doubleBuilder("Custom Item Health").withValue(14.0).withVisibility(v -> smartOffhand.getValue() && modeSetting.getValue().equals(Mode.REPLACE_OFFHAND)).build()); private Setting smartItemSetting = register(Settings.enumBuilder(CustomItem.class).withName("Item").withValue(CustomItem.GAPPLE).withVisibility(v -> smartOffhand.getValue()).build()); private enum Mode { NEITHER, REPLACE_OFFHAND, INVENTORY;} diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/combat/OffhandGap.java b/src/main/java/me/zeroeightsix/kami/module/modules/combat/OffhandGap.java index b007eada..f36e92d8 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/combat/OffhandGap.java +++ b/src/main/java/me/zeroeightsix/kami/module/modules/combat/OffhandGap.java @@ -18,9 +18,6 @@ import java.util.Objects; import static me.zeroeightsix.kami.module.modules.gui.InfoOverlay.getItems; -import java.util.Comparator; -import java.util.Objects; - /** * @author polymer (main listener switch function xd) * @author S-B99 (made epic and smooth and cleaned up code <3) (why did i rewrite this 4 times) @@ -55,9 +52,9 @@ public class OffhandGap extends Module { return; } if (mc.player.getHeldItemMainhand().getItem() instanceof ItemSword || mc.player.getHeldItemMainhand().getItem() instanceof ItemAxe || passItemCheck()) { - if (KamiMod.MODULE_MANAGER.isModuleEnabled(AutoOffhand.class)) { + if (KamiMod.MODULE_MANAGER.isModuleEnabled(AutoTotem.class)) { autoTotemWasEnabled = true; - KamiMod.MODULE_MANAGER.getModule(AutoOffhand.class).disable(); + KamiMod.MODULE_MANAGER.getModule(AutoTotem.class).disable(); } if (!eatWhileAttacking.getValue()) { /* Save item for later when using preventDesync */ usedItem = mc.player.getHeldItemMainhand().getItem(); @@ -138,9 +135,9 @@ public class OffhandGap extends Module { } private void disableGaps() { - if (autoTotemWasEnabled != KamiMod.MODULE_MANAGER.isModuleEnabled(AutoOffhand.class)) { + if (autoTotemWasEnabled != KamiMod.MODULE_MANAGER.isModuleEnabled(AutoTotem.class)) { moveGapsToInventory(gaps); - KamiMod.MODULE_MANAGER.getModule(AutoOffhand.class).enable(); + KamiMod.MODULE_MANAGER.getModule(AutoTotem.class).enable(); autoTotemWasEnabled = false; } }