Skip to content

Pass correct draw strength for EntityShootBowEvent#12308

Merged
Owen1212055 merged 5 commits intoPaperMC:mainfrom
TonytheMacaroni:draw-strength
May 2, 2025
Merged

Pass correct draw strength for EntityShootBowEvent#12308
Owen1212055 merged 5 commits intoPaperMC:mainfrom
TonytheMacaroni:draw-strength

Conversation

@TonytheMacaroni
Copy link
Contributor

Fixes #10640.

After testing, the broken behavior started in 1.20.5. In 1.20.4, EntityShootBowEvent#getForce worked as expected, returning a draw strength of [0, 1] for bows, and 1 for crossbows.

Additionally, a constant 0.8 was passed for force in AbstractSkeleton#performRangedAttack and Illusioner#performRangedAttack. After checking RangedBowAttackGoal, which calls the method with:

this.mob.performRangedAttack(target, BowItem.getPowerForTime(ticksUsingItem));

Which prompted changing it to passing the distanceFactor parameter as the force.

@TonytheMacaroni TonytheMacaroni requested a review from a team as a code owner March 16, 2025 20:34
@github-project-automation github-project-automation bot moved this to Awaiting review in Paper PR Queue Mar 16, 2025
@Warriorrrr Warriorrrr added type: bug Something doesn't work as it was intended to. scope: api labels Mar 17, 2025
@github-project-automation github-project-automation bot moved this from Awaiting review to Closed in Paper PR Queue Apr 26, 2025
@Lulu13022002 Lulu13022002 moved this from Closed to Awaiting review in Paper PR Queue Apr 26, 2025
Copy link
Contributor

@lynxplay lynxplay left a comment

Choose a reason for hiding this comment

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

Generally LGTM, it is missing paper comments in like every file patch tho 😅

@github-project-automation github-project-automation bot moved this from Awaiting review to Changes required in Paper PR Queue May 2, 2025
@github-project-automation github-project-automation bot moved this from Changes required to Awaiting final testing in Paper PR Queue May 2, 2025
@Owen1212055 Owen1212055 merged commit 1074237 into PaperMC:main May 2, 2025
3 checks passed
@github-project-automation github-project-automation bot moved this from Awaiting final testing to Merged in Paper PR Queue May 2, 2025
@TonytheMacaroni TonytheMacaroni deleted the draw-strength branch August 17, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: api type: bug Something doesn't work as it was intended to.

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

EntityShootBowEvent doesn't work correctly

4 participants