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

Fix dolphin and fish hack #799

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

ThisTestUser
Copy link
Contributor

@ThisTestUser ThisTestUser commented Mar 17, 2023

Currently, dolphin and fish hack uses Entity.isWet(), which causes them to activate when the player is in rain (which is not the intended behavior of those hacks) and in a bubble column (where the hack would be ineffective anyways). Changing it to isTouchingWater() makes these hacks only activate in the correct scenario.

Summary by CodeRabbit

  • Bug Fix: Improved the accuracy of water interaction in two Minecraft mods. The 'DolphinHack' and 'FishHack' mods now correctly identify when the player is touching water, rather than just being wet. This change enhances the realism and immersion of the game, providing a more accurate and enjoyable user experience.

@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

@coderabbitai
Copy link

coderabbitai bot commented Oct 22, 2023

Walkthrough

The changes primarily focus on improving the accuracy of conditions in the onUpdate methods of two Minecraft mods. The conditions have been updated from checking if the player is wet (player.isWet()) to verifying if the player is actually touching water (player.isTouchingWater()). This ensures that the code only proceeds under the correct circumstances.

Changes

File Path Summary
.../hacks/DolphinHack.java Updated the condition in the onUpdate method to check if the player is touching water instead of being wet. This improves the accuracy of the condition.
.../hacks/FishHack.java Modified the condition in the onUpdate method to verify if the player is touching water rather than being wet. This enhances the precision of the condition.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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 help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

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

Commits Files that changed from the base of the PR and between b1076bd and 7d8936b.
Files selected for processing (2)
  • src/main/java/net/wurstclient/hacks/DolphinHack.java (1 hunks)
  • src/main/java/net/wurstclient/hacks/FishHack.java (1 hunks)
Additional comments (Suppressed): 2
src/main/java/net/wurstclient/hacks/DolphinHack.java (1)
  • 40-46: The change from player.isWet() to player.isTouchingWater() is a good one as it ensures the hack is only activated when the player is actually in water, not just wet from rain or bubble columns. However, please verify that player.isTouchingWater() is the correct method to use and it doesn't have any unintended side effects.
src/main/java/net/wurstclient/hacks/FishHack.java (1)
  • 40-46: The change from player.isWet() to player.isTouchingWater() is a good one as it ensures that the hack is only activated when the player is actually in contact with water, not just when they are in the rain or in a bubble column. This change aligns with the intended functionality of the hack. However, please verify that the isTouchingWater() method provides the expected behavior in all scenarios, including when the player is partially submerged or touching water from the side.

@Alexander01998 Alexander01998 added the status:merged This pull request has been merged, even if GitHub says otherwise. label Oct 22, 2023
@Alexander01998 Alexander01998 added this to the v7.38 milestone Oct 22, 2023
@Alexander01998 Alexander01998 merged commit eb82603 into Wurst-Imperium:master Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:movement status:confirmed status:merged This pull request has been merged, even if GitHub says otherwise. type:bugfix This can be released as a patch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants