prevent opening containers with autoeat
This commit is contained in:
parent
1b44539825
commit
8152df14dd
2 changed files with 4 additions and 1 deletions
|
@ -45,6 +45,7 @@ public class AutoEat extends Feature {
|
||||||
lastSlot = -1;
|
lastSlot = -1;
|
||||||
}
|
}
|
||||||
eating = false;
|
eating = false;
|
||||||
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindSneak.getKeyCode(), false);
|
||||||
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -57,6 +58,7 @@ public class AutoEat extends Feature {
|
||||||
}
|
}
|
||||||
mc.player.setActiveHand(EnumHand.OFF_HAND);
|
mc.player.setActiveHand(EnumHand.OFF_HAND);
|
||||||
eating = true;
|
eating = true;
|
||||||
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindSneak.getKeyCode(), true);
|
||||||
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
|
||||||
((IMinecraft) mc).rightClick();
|
((IMinecraft) mc).rightClick();
|
||||||
} else {
|
} else {
|
||||||
|
@ -68,6 +70,7 @@ public class AutoEat extends Feature {
|
||||||
lastSlot = mc.player.inventory.currentItem;
|
lastSlot = mc.player.inventory.currentItem;
|
||||||
mc.player.inventory.currentItem = i;
|
mc.player.inventory.currentItem = i;
|
||||||
eating = true;
|
eating = true;
|
||||||
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindSneak.getKeyCode(), true);
|
||||||
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
|
KeyBinding.setKeyBindState(mc.gameSettings.keyBindUseItem.getKeyCode(), true);
|
||||||
((IMinecraft) mc).rightClick();
|
((IMinecraft) mc).rightClick();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -19,7 +19,7 @@ public class AutoRespawn extends Feature {
|
||||||
if (mc.currentScreen instanceof GuiGameOver && !lock.isLocked()) {
|
if (mc.currentScreen instanceof GuiGameOver && !lock.isLocked()) {
|
||||||
mc.player.respawnPlayer();
|
mc.player.respawnPlayer();
|
||||||
mc.displayGuiScreen(null);
|
mc.displayGuiScreen(null);
|
||||||
BaseBand.notify("Respawned.");
|
BaseBand.notify("[AutoRespawn] Respawned.");
|
||||||
lock.lock(500);
|
lock.lock(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue