prevent opening containers with autoeat

This commit is contained in:
Jess H 2024-05-28 06:28:17 +01:00
parent 1b44539825
commit 8152df14dd
2 changed files with 4 additions and 1 deletions

View file

@ -45,6 +45,7 @@ public class AutoEat extends Feature {
lastSlot = -1;
}
eating = false;
KeyBinding.setKeyBindState(mc.gameSettings.keyBindSneak.getKeyCode(), false);
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
return;
}
@ -57,6 +58,7 @@ public class AutoEat extends Feature {
}
mc.player.setActiveHand(EnumHand.OFF_HAND);
eating = true;
KeyBinding.setKeyBindState(mc.gameSettings.keyBindSneak.getKeyCode(), true);
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
((IMinecraft) mc).rightClick();
} else {
@ -68,6 +70,7 @@ public class AutoEat extends Feature {
lastSlot = mc.player.inventory.currentItem;
mc.player.inventory.currentItem = i;
eating = true;
KeyBinding.setKeyBindState(mc.gameSettings.keyBindSneak.getKeyCode(), true);
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
((IMinecraft) mc).rightClick();
return;

View file

@ -19,7 +19,7 @@ public class AutoRespawn extends Feature {
if (mc.currentScreen instanceof GuiGameOver && !lock.isLocked()) {
mc.player.respawnPlayer();
mc.displayGuiScreen(null);
BaseBand.notify("Respawned.");
BaseBand.notify("[AutoRespawn] Respawned.");
lock.lock(500);
}
}