DAI 3.0 · STEP-BY-STEP

Weapons & Combat Items

Create server-authoritative melee/ranged weapons with costs, cooldowns, projectiles, hit rules and readable feedback.

Build from scratchTest in MinecraftMultiplayer-safe by designDAI 3.0

What you are building

Primary path: data/<namespace>/dai_weapons/
Create server-authoritative melee/ranged weapons with costs, cooldowns, projectiles, hit rules and readable feedback.

Step-by-step

  1. Start with one weapon carrierGive the player one clearly identifiable item and confirm equip detection.
  2. Define the weaponAdd a dai_weapons definition with the stable weapon ID and its combat metadata.
  3. Choose the inputDecide attack, use, keybind, hold or combined input. Gate server execution on the authoritative state.
  4. Validate readinessCheck cooldown/resource/target/range before spending anything.
  5. Execute damage or projectileApply melee damage from the server or call a registered projectile definition.
  6. Spend resource and start cooldownOnly after the action succeeds.
  7. Show stateUse item model state, actionbar/HUD, sounds or particles for ready/cooldown/empty states.
  8. 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.