Repository navigation
fix: keep cluster bomblets falling outside simulation distance - #78
Conversation
Bomblets were moved by vanilla physics, which stops more than simulation-distance chunks from every player. A cluster shell that split out there left its bomblets frozen in mid-air with a task that never ended, so they exploded only when a player came near or the chunk unloaded. Bomblets now move themselves each tick with armour stand gravity and drag, like the parent shell. A block ray trace stops them on the surface instead of passing through roofs or into the ground. Any bomblet still falling after 200 ticks is removed without exploding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@coderabbitai review |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
✅ Action performedReview finished.
|
Problem
Cluster bomblets were moved by vanilla physics (
setVelocity). Entities stop moving more than simulation-distance chunks from every player (6 on Main). A cluster shell that split out there left its 24 bomblets frozen in mid-air:The parent shell already moves itself with
teleporteach tick, so it was not affected.Change
DefaultShooter.sendClusternow moves each bomblet itself:setGravity(false)stops vanilla moving it a second time near players.hasHit(nearby blocks and entities) andisDead()still detonate it as before.isOnGround()is no longer used, because vanilla no longer updates it.Tests
WeaponsCoverageTest:mvn verifylocally: 1745 tests, 0 failures. The only uncovered lines are the existing Windows-skipped permission tests (VehicleRepository, template loaders, TrackStore); CI covers them on Linux.Dev test (TFMCDev01, bot in a Fixed Artillery firing clusterbombs)
Dev has simulation-distance 8. For the test I raised the artillery's
projectile-velocityto 6 so the split could land beyond it, then restored the config afterwards. The bot counted the explosion particles VF sends to players within 320 blocks.In the control shot, bomblets now stop at the sea surface instead of sinking about a block and a half first.
🤖 Generated with Claude Code