fix issue 79\#79

fix issue #79
This commit is contained in:
S-B99 2019-11-10 17:34:38 -05:00
parent 4a31def7ee
commit b5540567b6
1 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ public class AutoTotem extends Module {
int totems;
boolean moving = false;
boolean returnI = false;
private Setting<Boolean> soft = register(Settings.b("Soft"));
private Setting<Boolean> force = register(Settings.b("Force"));
@Override
public void onUpdate() {
@ -36,7 +36,7 @@ public class AutoTotem extends Module {
totems = mc.player.inventory.mainInventory.stream().filter(itemStack -> itemStack.getItem() == Items.TOTEM_OF_UNDYING).mapToInt(ItemStack::getCount).sum();
if (mc.player.getHeldItemOffhand().getItem() == Items.TOTEM_OF_UNDYING) totems++;
else {
if (soft.getValue() && !mc.player.getHeldItemOffhand().isEmpty) return;
if (!force.getValue() && !mc.player.getHeldItemOffhand().isEmpty) return;
if (moving) {
mc.playerController.windowClick(0, 45, 0, ClickType.PICKUP, mc.player);
moving = false;
@ -54,7 +54,7 @@ public class AutoTotem extends Module {
if (t == -1) return; // Should never happen!
mc.playerController.windowClick(0, t < 9 ? t + 36 : t, 0, ClickType.PICKUP, mc.player);
moving = true;
} else if (!soft.getValue()) {
} else if (force.getValue()) {
int t = -1;
for (int i = 0; i < 45; i++)
if (mc.player.inventory.getStackInSlot(i).isEmpty) {