Fix activateItem always having the same rotation#3840
Merged
rom1504 merged 3 commits intoPrismarineJS:masterfrom Apr 2, 2026
Merged
Fix activateItem always having the same rotation#3840rom1504 merged 3 commits intoPrismarineJS:masterfrom
rom1504 merged 3 commits intoPrismarineJS:masterfrom
Conversation
|
Could this be related to why my bot always faced south when trying to go fishing? The bot will look at the right water block and then turn south quickly, cast, and then look back at the block. |
Contributor
Yes |
|
has this been pulled to main? |
Verifies that bot.activateItem() sends the bot's current yaw and pitch (converted via toNotchianYaw/toNotchianPitch) in the use_item packet's rotation field. Skips on protocol versions before 1.21.1 where the rotation field does not exist. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1ab8146 to
7a4af38
Compare
Verifies that activateItem sends the bot's actual yaw/pitch in the use_item packet by intercepting the outgoing packet and checking the rotation values match expected Notchian angles for two different look directions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
|
Added tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Correctly uses the bot's rotation in the
activateItemfunction instead of having a (0, 0) rotation.Fixes:
#3537
#3621
#3833