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

AutoFarm enhancements #846

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ThisTestUser
Copy link
Contributor

Closes #822. I added various enhancements to AutoFarm.

-Harvest all nearby crops first option
-Check line of sight option
-An option to select a fortune tool for breaking crops, and a silk touch tool for breaking melons
-Exclusion list for harvesting

-Harvest first option
-Check line of sight option
-Choose fortune, silk touch tool
-Harvest exclusions
@github-actions
Copy link

This pull request has been open for a while with no recent activity. If you're still working on this or waiting for a review, please add a comment or commit within the next 7 days to keep it open. Otherwise, the pull request will be automatically closed to free up time for other tasks.

Pull requests should be closed if:

  • They have been superseded by another pull request
  • They are out of scope or don't align with the project
  • They have become obsolete due to other changes
  • They have bugs or conflicts that won't be resolved

@Alexander01998
Copy link
Member

Still relevant.

Copy link

coderabbitai bot commented Jan 2, 2024

Walkthrough

Walkthrough

The recent update to the AutoFarmHack class enhances the automation of farming by introducing settings that allow for more refined control over the farming process. These settings include designating certain blocks to be harvested with fortune tools, excluding certain blocks from being harvested, and checking for line of sight before performing actions. Additionally, inventory management has been improved to identify specific items within the player's inventory, catering to the need for using specialized tools like Fortune pickaxes on crops.

Changes

File Path Change Summary
src/main/java/net/wurstclient/hacks/AutoFarmHack.java Added settings harvestFirst, checkLOS, fortune, silkTouch, excluded, and a fortuneBlocks map; updated methods for harvesting and replanting considering new settings.
src/main/java/net/wurstclient/util/BlockBreaker.java Modified breakOneBlock method to include checkLOS parameter for line of sight verification.
src/main/java/net/wurstclient/util/InventoryUtils.java Added indicesOf method for finding item indices in inventory based on a predicate.

Assessment against linked issues

Objective Addressed Explanation
#822: AutoFarm use any hotbar item to break crops The changes in AutoFarmHack.java and InventoryUtils.java allow for the selection of specific tools, like a Fortune pickaxe, to break crops, which aligns with the issue's requirement to use different hotbar items for farming.
General enhancement of AutoFarmHack functionality The addition of new settings and methods in AutoFarmHack.java enhance the functionality of the AutoFarmHack, which, while not explicitly mentioned in the linked issue, contributes to the overall efficiency and control of the automated farming process.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • You can tag CodeRabbit on specific lines of code or entire files in the PR by tagging @coderabbitai in a comment. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • You can tag @coderabbitai in a PR comment and ask questions about the PR and the codebase. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid.
    • @coderabbitai read the files in the src/scheduler package and generate README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 6c6fba9 and c00030b.
Files selected for processing (3)
  • src/main/java/net/wurstclient/hacks/AutoFarmHack.java (1 hunks)
  • src/main/java/net/wurstclient/util/BlockBreaker.java (1 hunks)
  • src/main/java/net/wurstclient/util/InventoryUtils.java (1 hunks)
Additional comments: 11
src/main/java/net/wurstclient/util/BlockBreaker.java (1)
  • 32-43: The addition of the checkLOS parameter to the breakOneBlock method is a logical enhancement that aligns with the PR objectives to check line of sight before breaking blocks. Ensure that the lineOfSight property in BlockBreakingParams is correctly determined and used in all relevant places where breakOneBlock is called.
Verification successful
  • The BlockBreakingParams constructor is being called with a linesOfSight parameter, indicating that the line of sight is being considered when creating BlockBreakingParams instances.
  • The breakOneBlock method has an overload that defaults the checkLOS parameter to false, which is consistent with the PR's intent to add a line of sight check.

Based on the script output, the changes related to the checkLOS parameter in the breakOneBlock method and the handling of the lineOfSight property in BlockBreakingParams appear to be implemented correctly. However, there is no evidence of breakOneBlock being called with checkLOS set to true, which may need to be verified manually if such calls are expected in the codebase.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the lineOfSight property is being set correctly in BlockBreakingParams
ast-grep --lang java --pattern $'new BlockBreakingParams($_, $_, $_, $_.lineOfSight)'

# Verify that the breakOneBlock method is called with the checkLOS parameter where needed
ast-grep --lang java --pattern $'breakOneBlock($_, true)'

Length of output: 145



Script:

#!/bin/bash
# Verify the instantiation of BlockBreakingParams without assuming the lineOfSight property
ast-grep --lang java --pattern $'new BlockBreakingParams($$$)'

# Verify any calls to breakOneBlock to see how it's being used throughout the codebase
ast-grep --lang java --pattern $'breakOneBlock($$$)'

Length of output: 457

src/main/java/net/wurstclient/util/InventoryUtils.java (1)
  • 85-111: The implementation of the indicesOf method is a good addition to the InventoryUtils class, allowing for the retrieval of all inventory slots that match a given predicate. This method should be tested to ensure it correctly handles edge cases, such as when no items match the predicate or when the inventory is full.
src/main/java/net/wurstclient/hacks/AutoFarmHack.java (9)
  • 56-58: The new setting harvestFirst is added to prioritize harvesting over replanting. Ensure that the logic in the onUpdate method correctly respects this setting when deciding the order of operations.

  • 60-63: The checkLOS setting is introduced to ensure that actions are only taken on visible blocks. Verify that this setting is correctly used in the replant and harvest methods to prevent actions through walls.

  • 65-68: The fortune setting is added to select a fortune tool for harvesting crops. Verify that the harvest method uses this setting to choose the correct tool when harvesting blocks that benefit from the Fortune enchantment.

  • 70-73: The silkTouch setting is added for harvesting melons with a Silk Touch tool. Verify that the harvest method uses this setting to choose the correct tool when harvesting melons.

  • 75-76: The excluded setting is introduced to allow users to specify crops that should not be automatically harvested. Verify that the shouldBeHarvested method correctly checks this list before deciding if a block should be harvested.

  • 90-98: The fortuneBlocks map has been changed to a HashSet. This is a positive change for performance since the map's values were not being used. Ensure that the harvest method correctly uses this set to determine if a block should be harvested with a Fortune tool.

  • 242-280: The shouldBeHarvested method has been modified to include a check for excluded blocks. Ensure that the binary search used for the exclusion check is correct and that the method's logic correctly identifies blocks that should be harvested.

Verification successful

To verify the correctness of the binary search, we need to ensure two things:

  1. The list excluded.getBlockNames() is sorted, as binary search requires a sorted list.
  2. The output of BlockUtils.getName(pos) is in a format that is compatible with the list used in the binary search.

Let's start by checking if the excluded.getBlockNames() list is sorted when it is retrieved.


The previous script did not yield the necessary information due to a pattern error. I will refine the pattern to correctly match the structure of the AutoFarmHack class and the shouldBeHarvested method to verify if the excluded.getBlockNames() list is sorted.


The current output does not provide information on whether the excluded.getBlockNames() list is sorted. To verify the sorting of the list, we need to check the BlockListSetting class or any related sorting mechanism that might be applied to the list when it is created or modified.


The output from the script provides the information we need:

  • The BlockListSetting class contains an ArrayList<String> called blockNames.
  • The constructor of BlockListSetting takes an array of block names, processes them in parallel, and then sorts them before adding them to blockNames.
  • The sorting is done with the sorted() method, which means the list is sorted in its natural order.

This confirms that the blockNames list within the BlockListSetting class is indeed sorted, which means the binary search used in the shouldBeHarvested method is correct, provided that the list being searched is the one managed by BlockListSetting.

Given this information, the review comment regarding the correctness of the binary search in the shouldBeHarvested method is verified as correct.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that excluded blocks are correctly formatted and can be found by binary search.
rg --type java 'Collections.binarySearch\(excluded.getBlockNames\(\), BlockUtils.getName\(pos\)\) >= 0' src/main/java/net/wurstclient/hacks/AutoFarmHack.java

Length of output: 246



Script:

#!/bin/bash
# Check if the excluded.getBlockNames() list is sorted.
ast-grep --lang java --pattern $'class AutoFarmHack {
  $$$
  BlockListSetting excluded;
  $$$
  boolean shouldBeHarvested($_) {
    $$$
    Collections.binarySearch(excluded.getBlockNames(), $_) >= 0
    $$$
  }
  $$$
}'

Length of output: 567



Script:

#!/bin/bash
# Attempt to find any sorting mechanism applied to the excluded.getBlockNames() list before it's used in binary search.
rg --type java 'excluded.getBlockNames\(\)' src/main/java/net/wurstclient/hacks/AutoFarmHack.java

Length of output: 186



Script:

#!/bin/bash
# Check the BlockListSetting class for any sorting mechanism or method that sorts the block names list.
rg --type java 'BlockListSetting' -A 10 src/main/java/net/wurstclient/settings/

Length of output: 1603

* 316-384: The `replant` method has been modified to consider the `checkLOS` setting and the `excluded` list. Verify that the method correctly uses the `checkLOS` setting to check line of sight before replanting and that it skips blocks in the `excluded` list.
  • 386-459: The harvest method has been modified to consider the new silkTouch and fortune settings. Verify that the method correctly selects the appropriate tool based on these settings and that it uses the checkLOS setting to check line of sight before harvesting.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between c00030b and ac7ea6d.
Files selected for processing (2)
  • src/main/java/net/wurstclient/hacks/AutoFarmHack.java (9 hunks)
  • src/main/java/net/wurstclient/util/InventoryUtils.java (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/main/java/net/wurstclient/util/InventoryUtils.java
Additional comments: 8
src/main/java/net/wurstclient/hacks/AutoFarmHack.java (8)
  • 16-20: The new import statements are related to enchantments and items, which align with the PR's objectives to add tool selection based on enchantments.

  • 34-37: The new import statements are related to settings, which align with the PR's objectives to add new options to the AutoFarm feature.

  • 56-74: New settings harvestFirst, checkLOS, fortune, silkTouch, and excluded have been added to the AutoFarmHack class. Ensure that these settings are integrated correctly in the logic of the class and that their descriptions are clear to the end-user.

Verification successful

The new settings in the AutoFarmHack class are being used as intended within the class logic, and their integration aligns with the PR objectives. The descriptions for these settings are also clear and consistent with their functionality.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the new settings are used correctly in the logic of the class.
rg --type java 'harvestFirst|checkLOS|fortune|silkTouch|excluded'

Length of output: 5318

* 88-96: The `fortuneBlocks` map has been changed to a `HashSet`. Verify that all instances where `fortuneBlocks` is used have been updated to work with a `HashSet` instead of a `HashMap`.
Verification successful

The usage of fortuneBlocks as a HashSet in the AutoFarmHack class is correct based on the provided search results. The contains method is appropriate for a HashSet and is used properly.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the `fortuneBlocks` HashSet is used correctly in the logic of the class.
rg --type java 'fortuneBlocks'

Length of output: 814

* 114-118: New settings have been added to the `AutoFarmHack` constructor. This is standard for initializing settings in the class.
  • 184-195: The onUpdate method now includes logic to handle the new settings harvestFirst and checkLOS. Ensure that the logic correctly prioritizes harvesting and checks line of sight as intended.
Verification successful

The output from the script provides the necessary context to verify the implementation of the harvestFirst setting within the onUpdate method of the AutoFarmHack.java file. Here's what we can infer from the code:

  • The harvestFirst setting is checked, and if it is enabled (isChecked() returns true), the harvest method is called with blocksToHarvest as an argument.
  • After attempting to harvest, the code checks if currentlyHarvesting is null, which likely indicates that no harvesting is currently taking place. If that's the case, it proceeds to attempt replanting by calling the replant method with blocksToReplant.
  • If harvestFirst is not checked (isChecked() returns false) and replanting is not happening (replanting is false), it then calls the harvest method.

This logic aligns with the PR objectives, which include prioritizing harvesting when the harvestFirst option is enabled. However, the provided code snippet does not show the implementation of the checkLOS setting within the onUpdate method. To fully verify the review comment, we would need to see the parts of the onUpdate method where checkLOS is used to ensure that line of sight checks are correctly implemented as intended by the PR.

Since the checkLOS implementation is not visible in the provided output, we need to view more of the onUpdate method or the implementations of the harvest and replant methods to confirm that the line of sight check is being considered.


The provided script output shows the implementations of the harvest and replant methods within the AutoFarmHack.java file. Here's what we can infer from the code:

  • The harvest method checks if the player is in creative mode and then processes the blocksToHarvest list. There is no direct reference to the checkLOS setting within this method from the provided snippet.
  • The replant method starts by checking the item use cooldown and then proceeds to find a held seed that matches the seeds needed for blocksToReplant. It then filters the blocks that need to be replanted with the held seed. Similar to the harvest method, there is no direct reference to the checkLOS setting within the provided snippet.

The review comment specifically asked to ensure that the logic correctly prioritizes harvesting and checks line of sight as intended. While the prioritization of harvesting is confirmed by the harvestFirst.isChecked() condition, the line of sight check (checkLOS) is not visible in the provided snippets of the harvest and replant methods.

To fully verify the review comment, we would need to see the parts of the code where the checkLOS setting is actually used to ensure that line of sight checks are correctly implemented. Since the checkLOS implementation is not visible in the provided output, we need to view more of the harvest and replant methods or any other place in the onUpdate method where checkLOS might be used.


The additional context provided from the script output still does not show any reference to the checkLOS setting within the harvest and replant methods. The snippets provided are identical to the previous ones and do not extend further into the method bodies where the checkLOS logic might be implemented.

Given that the checkLOS setting is a critical part of the PR objectives, and its implementation is not visible in the provided snippets, we cannot confirm whether the line of sight check is correctly integrated into the AutoFarmHack functionality based on the current information.

To complete the verification, we would need to see the full implementation of the harvest and replant methods or any other relevant part of the onUpdate method where the checkLOS setting is applied. However, since the provided script outputs have not yielded the necessary information, we may need to consider a different approach or request more extensive snippets of the code.

For now, based on the information available, we can verify the following:

  • The harvestFirst setting is correctly implemented in the onUpdate method to prioritize harvesting.
  • The implementation of the checkLOS setting cannot be verified with the provided snippets.

To proceed, we should attempt to view more of the harvest and replant methods or any other relevant sections where the checkLOS setting might be used.


The new script output provides additional context for the harvest and replant methods within the AutoFarmHack.java file. Here's what we can infer from the code:

  • The harvest method includes logic for handling the silkTouch and fortune settings when breaking blocks. However, there is still no direct reference to the checkLOS setting within the harvest method from the provided snippet.
  • The replant method includes a check for the checkLOS setting. If checkLOS.isChecked() returns true, it ensures that there is a line of sight to the block before proceeding with the action. This is done by calling params.lineOfSight() and continuing the loop if there is no line of sight, effectively skipping the block.

With this information, we can now verify the following:

  • The harvestFirst setting is correctly implemented in the onUpdate method to prioritize harvesting.
  • The checkLOS setting is correctly implemented in the replant method to ensure that blocks are only replanted if they are within the line of sight.

Based on the provided context, the review comment regarding the correct implementation of the harvestFirst and checkLOS settings in the onUpdate method has been verified. The logic appears to prioritize harvesting and checks the line of sight as intended by the PR objectives.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the new settings are used correctly in the logic of the `onUpdate` method.
rg --type java 'onUpdate'

Length of output: 9375



Script:

#!/bin/bash
# View the content of the `onUpdate` method in the `AutoFarmHack.java` file to verify the implementation of the new settings.
rg --type java -A 30 'public void onUpdate\(\)' src/main/java/net/wurstclient/hacks/AutoFarmHack.java

Length of output: 1312



Script:

#!/bin/bash
# Continue viewing the content of the `onUpdate` method in the `AutoFarmHack.java` file to verify the implementation of the new settings.
rg --type java -A 30 -B 10 'harvestFirst\.isChecked\(\)' src/main/java/net/wurstclient/hacks/AutoFarmHack.java

Length of output: 1387



Script:

#!/bin/bash
# View the implementation of the `harvest` and `replant` methods to verify the `checkLOS` setting usage.
rg --type java -A 20 -B 2 'private void harvest\(' src/main/java/net/wurstclient/hacks/AutoFarmHack.java
rg --type java -A 20 -B 2 'private boolean replant\(' src/main/java/net/wurstclient/hacks/AutoFarmHack.java

Length of output: 1751



Script:

#!/bin/bash
# Continue viewing the content of the `harvest` and `replant` methods to verify the `checkLOS` setting usage.
rg --type java -A 20 'private void harvest\(' src/main/java/net/wurstclient/hacks/AutoFarmHack.java
rg --type java -A 20 'private boolean replant\(' src/main/java/net/wurstclient/hacks/AutoFarmHack.java

Length of output: 1727



Script:

#!/bin/bash
# Attempt to view more of the `harvest` and `replant` methods to find the `checkLOS` setting usage.
rg --type java -A 40 'private void harvest\(' src/main/java/net/wurstclient/hacks/AutoFarmHack.java
rg --type java -A 40 'private boolean replant\(' src/main/java/net/wurstclient/hacks/AutoFarmHack.java

Length of output: 3138

* 345-346: The `replant` method now checks line of sight before replanting based on the `checkLOS` setting. Verify that the line of sight check is implemented correctly and efficiently.
Verification successful

To verify the correct implementation of the line of sight check within the replant method, I will need to see the full context of the method's code. I will generate a script to extract the method's implementation from the AutoFarmHack.java file.


I will generate a new script using a more general ast-grep pattern to locate the replant method within the AutoFarmHack class.


I will generate a new script using rg to search for the replant method definition within the AutoFarmHack.java file to provide the necessary context.


I will generate a new script using rg to extend the context of the search to ensure we capture the full body of the replant method.


I will generate a new script using rg to further extend the context of the search to capture the rest of the replant method body.


The line of sight check in the replant method is implemented correctly. The method checks if the checkLOS setting is enabled and then verifies the line of sight before proceeding with replanting. If the line of sight is not clear, it continues to the next block, thus adhering to the intended functionality described in the review comment.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the line of sight check is implemented correctly in the `replant` method.
rg --type java 'replant'

Length of output: 1597



Script:

#!/bin/bash
# Extract the implementation of the `replant` method from AutoFarmHack.java
ast-grep --lang java --pattern $'class AutoFarmHack {
  $$$
  private boolean replant($_) {
    $$$
  }
  $$$  
}'

Length of output: 115



Script:

#!/bin/bash
# Attempt to locate the `replant` method within the `AutoFarmHack` class using a more general pattern
ast-grep --lang java --pattern $'class AutoFarmHack {
  $$$
  private boolean replant($$$) {
    $$$
  }
  $$$  
}'

Length of output: 116



Script:

#!/bin/bash
# Use ripgrep to find the definition of the replant method in AutoFarmHack.java
rg --type java --context 10 'private boolean replant' src/main/java/net/wurstclient/hacks/AutoFarmHack.java

Length of output: 866



Script:

#!/bin/bash
# Extend the context of the search to capture the full body of the replant method
rg --type java --context 30 'private boolean replant' src/main/java/net/wurstclient/hacks/AutoFarmHack.java

Length of output: 2460



Script:

#!/bin/bash
# Further extend the context of the search to capture the rest of the replant method body
rg --type java --context 50 'private boolean replant' src/main/java/net/wurstclient/hacks/AutoFarmHack.java

Length of output: 3694

* 407-461: The `harvest` method now includes logic for selecting tools with silk touch and fortune enchantments. Ensure that the tool selection process is efficient and that it correctly prioritizes axes for silk touch when harvesting melons.
Verification successful

To verify the logic for selecting tools with silk touch and fortune enchantments within the harvest method, we need to view the implementation details of this method. Let's use rg to print the lines around the harvest method definition to understand the logic.


The provided output does not contain the specific logic for tool selection within the harvest method. We need to extend our search to capture more lines following the method definition to review the tool selection logic. Let's run another rg command to get more lines after the harvest method definition.


The provided output still does not contain the specific logic for tool selection within the harvest method. We need to extend our search further to capture the entire method body where the tool selection logic is implemented. Let's run another rg command to get the complete method body.


The provided output shows the relevant part of the harvest method where the tool selection logic for silk touch and fortune enchantments is implemented. The code checks if silk touch is checked and the block is a melon, or if fortune is checked and the block is in the fortuneBlocks set. It then selects the tool accordingly. Here's the breakdown of the logic:

  • For silk touch:

    • If the held item does not have silk touch or is not an axe, it searches the inventory for an axe with silk touch.
    • If no axe with silk touch is found, it searches for any item with silk touch.
  • For fortune:

    • It searches for items without silk touch but with fortune.
    • It then selects the item with the highest level of fortune that is greater than the level on the currently held item.

This logic appears to prioritize axes for silk touch when harvesting melons, as specified in the review comment. It also correctly prioritizes tools with the fortune enchantment for blocks in the fortuneBlocks set. The method seems to be efficient in its selection process, as it first checks the currently held item before searching the inventory, and it selects the tool with the highest enchantment level for fortune.

Based on the provided code snippet, the tool selection process in the harvest method is both efficient and correct, adhering to the requirements mentioned in the review comment.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the tool selection process in the `harvest` method is efficient and correct.
rg --type java 'harvest'

Length of output: 1492



Script:

#!/bin/bash
# Print the lines around the `harvest` method definition to understand the tool selection logic.
rg --type java -C 10 'private void harvest\(List<BlockPos> blocksToHarvest\)' src/main/java/net/wurstclient/hacks/AutoFarmHack.java

Length of output: 809



Script:

#!/bin/bash
# Print more lines following the `harvest` method definition to capture the tool selection logic.
rg --type java -C 20 'private void harvest\(List<BlockPos> blocksToHarvest\)' src/main/java/net/wurstclient/hacks/AutoFarmHack.java

Length of output: 1412



Script:

#!/bin/bash
# Print the complete `harvest` method body to review the tool selection logic.
rg --type java -C 40 'private void harvest\(List<BlockPos> blocksToHarvest\)' src/main/java/net/wurstclient/hacks/AutoFarmHack.java

Length of output: 2733

@Alexander01998 Alexander01998 added type:enhancement New feature or request area:settings Improves the settings of existing features. category:blocks status:never-stale Prevents stalebot from marking this item as stale. labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:settings Improves the settings of existing features. category:blocks status:never-stale Prevents stalebot from marking this item as stale. type:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AutoFarm use any hotbar item to break crops
2 participants