Skip to content

Commit

Permalink
= AutoBazaar - Fixed delays
Browse files Browse the repository at this point in the history
  • Loading branch information
May2Beez committed Dec 27, 2023
1 parent bdfa341 commit abc8302
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ baseGroup=com.jelly.farmhelperv2
mcVersion=1.8.9
modid=farmhelperv2
modName=FarmHelper
version=2.3.2
version=2.3.3
shouldRelease=true
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.jelly.farmhelperv2.feature.impl;

import com.jelly.farmhelperv2.config.FarmHelperConfig;
import com.jelly.farmhelperv2.feature.IFeature;
import com.jelly.farmhelperv2.util.InventoryUtils;
import com.jelly.farmhelperv2.util.LogUtils;
Expand Down Expand Up @@ -196,7 +197,7 @@ private void handleBuyFromBz() {
case BZ_VERIFY:
if (this.openedChestGuiNameStartsWith("Bazaar ➜ \"")) {
log("Opened Bz.");
this.timer.schedule(500);
this.timer.schedule(FarmHelperConfig.getRandomGUIMacroDelay());
this.buyState = BuyState.CLICK_ON_PRODUCT;
}

Expand All @@ -222,7 +223,7 @@ private void handleBuyFromBz() {
case PRODUCT_VERIFY:
if (this.openedChestGuiProductNameStartsWith(this.itemToBuy)) {
log("Opened item page.");
this.timer.schedule(500);
this.timer.schedule(FarmHelperConfig.getRandomGUIMacroDelay());
this.buyState = BuyState.CLICK_BUY_INSTANTLY;
}
if (this.hasTimerEnded()) {
Expand All @@ -244,7 +245,7 @@ private void handleBuyFromBz() {
case BUY_INSTANTLY_VERIFY:
if (this.openedChestGuiNameStartsWith(this.itemToBuy + " ➜ Instant Buy")) {
log("Opened instant buy page");
this.timer.schedule(500);
this.timer.schedule(FarmHelperConfig.getRandomGUIMacroDelay());
this.buyState = BuyState.OPEN_SIGN;

Predicate<Slot> buyPredicate = slot -> slot.getHasStack()
Expand Down Expand Up @@ -290,7 +291,7 @@ private void handleBuyFromBz() {
case OPEN_SIGN_VERIFY:
if (mc.currentScreen instanceof GuiEditSign) {
log("Opened sign gui");
this.timer.schedule(500);
this.timer.schedule(FarmHelperConfig.getRandomGUIMacroDelay());
this.buyState = BuyState.EDIT_SIGN;
}

Expand All @@ -308,7 +309,7 @@ private void handleBuyFromBz() {
case VERIFY_CONFIRM_PAGE:
if (this.openedChestGuiNameContains("Confirm Instant Buy")) {
log("Opened confirm buy page");
this.timer.schedule(500);
this.timer.schedule(FarmHelperConfig.getRandomGUIMacroDelay());
this.buyState = BuyState.CLICK_BUY;
}
if (this.hasTimerEnded()) {
Expand Down Expand Up @@ -379,7 +380,7 @@ private void handleSellToBz() {
case BZ_VERIFY:
if (this.openedChestGuiNameStartsWith("Bazaar ➜ ")) {
log("Opened Bz.");
this.timer.schedule(500);
this.timer.schedule(FarmHelperConfig.getRandomGUIMacroDelay());
this.sellState = SellState.CLICK_INSTASELL;
}

Expand Down Expand Up @@ -416,7 +417,7 @@ private void handleSellToBz() {
case INSTASELL_VERIFY:
if (this.openedChestGuiNameContains("Are you sure?")) {
log("Opened instasell page.");
this.timer.schedule(500);
this.timer.schedule(FarmHelperConfig.getRandomGUIMacroDelay());
this.sellState = SellState.CLICK_CONFIRM_INSTASELL;
}
if (this.hasTimerEnded()) {
Expand Down

0 comments on commit abc8302

Please sign in to comment.