server/entity: Match Bedrock arrow damage - #1346
Open
HashimTheArab wants to merge 4 commits into
Open
Conversation
HashimTheArab
force-pushed
the
agent/fix-bedrock-arrow-damage
branch
from
July 23, 2026 01:05
66517db to
881b83a
Compare
HashimTheArab
force-pushed
the
agent/fix-bedrock-arrow-damage
branch
from
July 23, 2026 01:10
881b83a to
9420ecc
Compare
Contributor
|
LGTM |
ethaniccc
previously approved these changes
Jul 25, 2026
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.
Summary
Root cause
Dragonfly launches bow arrows with Bedrock velocity (
force * 5) but calculated impact damage using Java-styleceil(base damage * velocity). A fully charged unenchanted bow therefore dealt 10-15 raw damage instead of Bedrock’s 9-10 critical range. Crossbows were affected more severely because their configured damage of 9 was multiplied by their launch velocity, and their launch speed was incorrectly set to 5.15 instead of Bedrock’s dedicated crossbow arrow power of 3.15.This changes all arrow entities to one consistent Bedrock damage model: base damage plus 97% of current velocity, the 9-10 critical range, then Power scaling. Non-arrow projectiles keep their existing calculation.
The crossbow velocity was verified against the official BDS 1.26.36.1 binary: the crossbow constructor initializes
mDefaultArrowPowerto3.15f, and the arrow firing path passes that field directly to the projectile shoot call.Reference: https://learn.microsoft.com/en-us/minecraft/creator/reference/source/vanillabehaviorpack_snippets/entities/arrow
Validation
go test ./...git diff --check