@Subscribe
public void onUpdate(EventUpdate e) {
if (mc.player.openContainer instanceof ChestContainer container) {
IInventory lowerChestInventory = container.getLowerChestInventory();
for (int index = 0; index < lowerChestInventory.getSizeInventory(); ++index) {
ItemStack stack = lowerChestInventory.getStackInSlot(index);
if (!shouldMoveItem(container, index)) {
continue;
}
if (top()) {
continue;
}
if (delay.get() == 0.0f) {
moveItem(container, index, lowerChestInventory.getSizeInventory());
} else {
if (stopWatch.isReached(delay.get().longValue())) {
mc.playerController.windowClick(container.windowId, index, 0, ClickType.QUICK_MOVE, mc.player);
stopWatch.reset();
}
}
}
}
}
private boolean top() {
int[] sloterchecker;
sloterchecker = new int[]{1, 2, 3};
}