Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some #farm improvements #4561

Open
wants to merge 7 commits into
base: 1.21.1
Choose a base branch
from

Conversation

Avtera
Copy link

@Avtera Avtera commented Nov 18, 2024

added options:

  • farm continuously, configurable task threshold and check interval
  • farm whitelist for crop and pickup
  • farm prioritize pickup

changed:

  • farm compensate pickup pos on soulsand
  • farm pickup now respect #farm <range>

partially resolves #396 #893 #3537
closes #775 #2315

@Avtera Avtera changed the title Some Farm Improvements Some #farm improvements Nov 19, 2024
@end-user
Copy link

end-user commented Feb 2, 2025

I noticed the original #farm did not seem to prefer a tool (specifically with fortune 3) when harvesting. Could that be added?

Copy link
Collaborator

@ZacSharp ZacSharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed that I have pending comments on this. The review is probably incomplete, but I'll submit it now before I forget it again.

Having FarmProcess enable and disable itself in a kind of paused-but-not-quite state looks really weird. Is there a reason to not have it return a DEFER pathing command while it is waiting for crops?

Comment on lines +1007 to +1021
/**
* Farm whitelist, only interact with crop that is on the {@link #farmWhitelist} list
*/
public final Setting<Boolean> farmEnableWhitelist = new Setting<>(false);

/**
* Crop block that Baritone is allowed to farm and collect
* {@link #farmEnableWhitelist}
*/

public final Setting<List<Block>> farmWhitelist = new Setting<>(new ArrayList<>(Arrays.asList(
Blocks.WHEAT,
Blocks.POTATOES,
Blocks.CARROTS
)));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whitelist should default to allowing everything so farmEnableWhitelist is not needed.

Also I'm not sure whether we really should use Block rather than a new enum type for farm targets.

@@ -1397,7 +1436,7 @@ public final class Settings {
/**
* Desktop notification on farm fail
*/
public final Setting<Boolean> notificationOnFarmFail = new Setting<>(true);
public final Setting<Boolean> notificationOnFarmProcess = new Setting<>(true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you rename this?

Comment on lines +162 to +169
public Long getTime() {
return time;
}

public void setTime(Long time) {
this.time = time;
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these public?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants