Skip to content

Commit

Permalink
Another hour, another pre-release!
Browse files Browse the repository at this point in the history
Test failsafe:
= Bug fixes

Visitors Macro:
+ Ignoring visitors when you don't have enough inventory space
  • Loading branch information
onixiya1337 committed Mar 17, 2024
1 parent 3a12186 commit 7966721
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 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.5.0-pre9
version=2.5.0-pre10
shouldRelease=true
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ public class FarmHelperConfig extends Config {
FailsafeManager.getInstance().possibleDetection(FailsafeManager.getInstance().failsafes.get(testFailsafeTypeSelected));
else if (testFailsafeTypeSelected != 6)
LowerAvgBpsFailsafe.getInstance().clearQueue(); // Clear the queue to avoid false positives
FailsafeManager.getInstance().possibleDetection(FailsafeManager.getInstance().failsafes.get(testFailsafeTypeSelected + 2));
else
FailsafeManager.getInstance().possibleDetection(FailsafeManager.getInstance().failsafes.get(testFailsafeTypeSelected + 2));
};

@Dropdown(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ public void resetStates() {
}

private boolean checkIfRotatedBack() {
if (rotationBeforeReacting == null) // Test failsafe
return true;
if ((Math.abs(AngleUtils.get360RotationYaw(rotationBeforeReacting.getYaw()) - AngleUtils.get360RotationYaw()) < 0.1)
&& (Math.abs(AngleUtils.get360RotationYaw(rotationBeforeReacting.getPitch()) - mc.thePlayer.rotationPitch) < 0.1)) {
FailsafeManager.getInstance().stopFailsafes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1448,6 +1448,14 @@ public void onReceiveChat(ClientChatReceivedEvent event) {
PlayerUtils.closeScreen();
delayClock.schedule(getRandomDelay());
}
if (msg.startsWith("[Bazaar] You don't have enough inventory space")) {
LogUtils.sendWarning("[Visitors Macro] You don't have enough inventory space! Ignoring that visitor...");
servedCustomers.remove(currentVisitor.get());
ignoredNPCs.add(currentVisitor.get());
setVisitorsState(VisitorsState.ROTATE_TO_VISITOR);
PlayerUtils.closeScreen();
delayClock.schedule(getRandomDelay());
}
}

public enum MainState {
Expand Down

0 comments on commit 7966721

Please sign in to comment.