Directional Combat & First-Person Weapons
DAI provides the physical client-render/input foundation used by Musashi Story to replace Minecraft's default up/down hand swing with screen-space blade movement that matches the attack effect.
Control Model
SHEATHED ↓ hold LMB DRAW / READY ← camera origin captured ↓ move view DIRECTION PREVIEW (8-way) ↓ release LMB SLASH → RECOVERY No >=5° camera movement on release → FORWARD THRUST Hold RMB while blade is active → HALF-DRAW GUARD
Direction Contract
1 · UpVertical upward screen-space cut.2 · Up-RightDiagonal upward-right cut.3 · RightHorizontal right cut.4 · Down-RightDiagonal downward-right cut.5 · DownVertical downward cut.6 · Down-LeftDiagonal downward-left cut.7 · LeftHorizontal left cut.8 · Up-LeftDiagonal upward-left cut.9 · ThrustNeutral release with less than the directional threshold.Why the Engine Has to Participate
A datapack can own damage, state, reactions and server-authoritative gameplay. A resource pack can swap models and supply slash sprites. Neither can independently replace the physical first-person hand transform or selectively intercept Minecraft's attack/use presentation.
DAI client bridge
Reads physical LMB/RMB state, captures yaw/pitch, resolves direction, suppresses vanilla attack/use for supported blades and transforms the rendered main hand.
Datapack
Owns the experience's combat state, damage, release logic, reactions and screen-FX actions.
Resource pack
Owns sheathed/drawn/guard/attack weapon models, textures and matching directional screen sprites.
Musashi 3.0 Reference Controls
Hold LMB = begin draw and capture camera origin Move view = choose one of 8 directions Release = commit selected slash No >=5° movement = thrust where looking Hold RMB = half-draw diagonal guard
The physical key mappings remain readable for item-model conditions even though vanilla attack/use behavior is intercepted for the supported blade.
Synchronizing the Visual Hit
The most convincing presentation uses the same direction ID for all layers:
- Resolve the camera direction.
- Choose the physical hand + blade pose.
- Select the matching resource-pack attack model.
- Fire the same-direction slash overlay or sprite.
- Resolve gameplay hit/damage through the experience's authoritative logic.
- Recover to the drawn or sheathed state.
Testing Checklist
- Verify all eight direction boundaries independently.
- Verify a release below the five-degree threshold resolves as a thrust.
- Verify RMB enters guard without activating unrelated vanilla item use.
- Verify switching away from the blade immediately clears custom render/input state.
- Verify normal Minecraft weapons retain normal behavior.
- Verify the resource pack's slash sprite direction matches the physical weapon motion.
- Verify third-person/gameplay damage remains authoritative even when first-person presentation is client-side.