DAI 3.0 · STEP-BY-STEP
Weapons & Combat Items
Create server-authoritative melee/ranged weapons with costs, cooldowns, projectiles, hit rules and readable feedback.
What you are building
Primary path:
Create server-authoritative melee/ranged weapons with costs, cooldowns, projectiles, hit rules and readable feedback.
data/<namespace>/dai_weapons/Create server-authoritative melee/ranged weapons with costs, cooldowns, projectiles, hit rules and readable feedback.
Step-by-step
- Start with one weapon carrierGive the player one clearly identifiable item and confirm equip detection.
- Define the weaponAdd a
dai_weaponsdefinition with the stable weapon ID and its combat metadata. - Choose the inputDecide attack, use, keybind, hold or combined input. Gate server execution on the authoritative state.
- Validate readinessCheck cooldown/resource/target/range before spending anything.
- Execute damage or projectileApply melee damage from the server or call a registered projectile definition.
- Spend resource and start cooldownOnly after the action succeeds.
- Show stateUse item model state, actionbar/HUD, sounds or particles for ready/cooldown/empty states.
- Abuse-test itSpam input, swap slots, die mid-action, reload, miss targets and test PvP ownership/team rules.
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.