Skip to content

fix: stop landings from wrecking vehicle weapons - #74

Merged
ryanbarlow97 merged 1 commit into
mainfrom
fix/weapon-fall-damage
Oct 15, 2026
Merged

ryanbarlow97 merged 1 commit into
mainfrom
fix/weapon-fall-damage

Conversation

@ryanbarlow97

@ryanbarlow97 ryanbarlow97 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Players reported the Cloudskimmer's anti-air turret dropping back to 0% after repair. On Main, 13 of 15 Cloudskimmers and the one monoplane have every weapon at 0%, while their hulls are mostly untouched. Ships' weapons are fine.

The vehicle body is an armour stand, and Paper sends it FALL damage when an aircraft lands. Components take that through their armour template (airship and aircraft set FALL: 0.0), but weapons only read their own damage: list, which no vehicle sets. Each landing therefore hit every gun and bomb bay at full strength.

Weapons now default FALL to 0. A weapon's own damage: list can still set it.

Docs: TF-Minecraft/Docs#273

Tested with mvn clean verify (new fallDamageSparesWeaponsUnlessConfigured test; coverage gate passes).

🤖 Generated with Claude Code

Vehicle weapons had no damage modifiers, so the FALL damage an armour
stand takes on landing hit them in full while armour templates spared
every component. Weapons now default FALL to 0 unless their own damage
list sets it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the size:XS 0-9 effective changed lines (tests excluded in mixed PRs). label Oct 15, 2026
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dcd8063c-92f5-4856-b0b9-fb20bce40c6f
📥 Commits

Reviewing files that changed from the base of the PR and between 664d875 and 08eeaf7.

📒 Files selected for processing: 2
  • src/main/java/net/tfminecraft/vehicleframework/weapons/Weapon.java
  • src/test/java/net/tfminecraft/vehicleframework/weapons/WeaponsCoverageTest.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Fall damage no longer increases weapon damage by default. Explicitly configured fall damage modifiers continue to apply.

The Weapon constructor now adds a FALL modifier with value 0.0 when loaded damage data does not define one. The test checks default fall damage handling and confirms that a configured fall(0.5) value is preserved.

Changes: Weapon fall damage

Layer / File(s) Summary
Default fall damage modifier
src/main/java/net/tfminecraft/vehicleframework/weapons/Weapon.java, src/test/java/net/tfminecraft/vehicleframework/weapons/WeaponsCoverageTest.java
The constructor adds a FALL modifier of 0.0 only when one is absent. The test checks that default fall damage does not increase the accumulated damage total, projectile damage does, and configured fall(0.5) is parsed as 0.5.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 08eea

Weapons now ignore fall damage by default while retaining explicitly configured fall modifiers. The verified behavior and regression test leave no actionable merge risk.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ryanbarlow97

Copy link
Copy Markdown
Contributor Author

Muse (muse-wonder-full-1.0) reviewed this: VERDICT OK. It confirmed the damage path and parity with component armour, and found no other cause that zeroes aircraft weapons. One non-blocking nit about the test's configured-FALL branch. CodeRabbit approved.

@ryanbarlow97
ryanbarlow97 merged commit 9b48fe4 into main Oct 15, 2026
3 checks passed
@ryanbarlow97
ryanbarlow97 deleted the fix/weapon-fall-damage branch October 15, 2026 23:20
ryanbarlow97 added a commit to TF-Minecraft/Docs that referenced this pull request Oct 15, 2026
Pairs with TF-Minecraft/VehicleFramework#74.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant