Skip to content

Commit

Permalink
Fix AutoChest (#734)
Browse files Browse the repository at this point in the history
  • Loading branch information
xia-mc committed Aug 18, 2024
1 parent d96a1ec commit 5649baa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/keystrokesmod/module/impl/player/AutoChest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class AutoChest extends Module {
private int clickDelay = 0;

public AutoChest() {
super("AutoChest", category.render, "Auto put resources into chest. (Hypixel)");
super("AutoChest", category.experimental, "Auto put resources into chest. (Hypixel)");
this.registerSetting(minDelay = new SliderSetting("Min delay", 50, 0, 500, 10));
this.registerSetting(maxDelay = new SliderSetting("Max delay", 50, 0, 500, 10));
this.registerSetting(silent = new ButtonSetting("Silent", false));
Expand Down Expand Up @@ -61,7 +61,7 @@ public void onPreMotion(PreMotionEvent event) {
ItemStack[] inventory = mc.thePlayer.inventory.mainInventory;
for (int i = 0; i < inventory.length; i++) {
ItemStack stack = inventory[i];
if (ITEMS.contains(stack.getItem())) {
if (stack != null && ITEMS.contains(stack.getItem())) {
ContainerUtils.click(i + (int) debug.getInput());
clickDelay = Utils.randomizeInt(minDelay.getInput() / 50, maxDelay.getInput() / 50);
onPreMotion(event);
Expand Down

0 comments on commit 5649baa

Please sign in to comment.