DAI 3.0 · STEP-BY-STEP
Projectiles
Create projectile physics with speed, gravity, collision, ricochet/homing/return behavior and authoritative impacts.
What you are building
Primary path:
Create projectile physics with speed, gravity, collision, ricochet/homing/return behavior and authoritative impacts.
data/<namespace>/dai_projectiles/Create projectile physics with speed, gravity, collision, ricochet/homing/return behavior and authoritative impacts.
Step-by-step
- Create a projectile definitionGive it a stable ID under
dai_projectiles. - Set physical motionTune speed/gravity/lifetime before damage.
- Define collision rulesDecide block/entity collision, owner immunity, team/PvP behavior and pierce/ricochet.
- Add impact behaviorDamage, knockback, particles and follow-up functions run server-side.
- Spawn through weapon/action logicThe firing action should validate resource/cooldown before projectile creation.
- Test moving targets and wallsFire point-blank, long range, through crowds, at corners and while the shooter moves.
Definition of done
- The feature still works after save/reload.
- Server state is authoritative; presentation mirrors it.
- Invalid input cannot duplicate rewards or bypass costs.
- Two players can use the system without sharing unintended temporary state.
- Any optional resource pack can be disabled without breaking datapack logic.
Next integration
Once this feature works alone, connect it to a complete loop instead of adding more isolated content. Use the complete-game tracks to see where it belongs in ACMS, Space Between Blocks, MineTrigger or Hollow Spiral.