General Dodging
The dodge is the central mechanic of Perfect Dodges. A normal dodge is a directional dash, but if you get hit during the invincibility window, your character performs a reactive dodge animation (roll, twirl, or flip) depending on where the attack lands on your body.
All settings mentioned on this page can be adjusted in-game. Use /dodgemodsettings to configure them.
8-Directional Dodging
Dodges work in eight directions: forward, backward, left, right, and all four diagonals. The direction is determined by the movement keys you're holding when the dodge triggers. If you're standing still when you dodge, you'll dash backward.
Invincibility Frames (iFrames)
During the dodge, an invincibility window activates for 200ms. While iFrames are active:
- Incoming damage is completely blocked
- Dash velocity is maintained through hits, so you aren't knocked out of your dodge
The iFrame duration is controlled by iFrameDurationMs.
Trigger Modes
Perfect Dodges supports two ways to trigger a dodge.
Ability Key Mode (Default)
The dodge is bound to the Sprint key by default on all items that don't already have that set up.
In this mode, you choose a distance preset that controls how far each dodge travels:
| Preset | Setting | Distance |
|---|---|---|
| 1 -- Short | dodgePreset: 1 | force 5+5 forward |
| 2 -- Standard | dodgePreset: 2 | force 8+7 forward, 13 for other directions |
| 3 -- Far | dodgePreset: 3 | force 12+10 forward |
Alternatively, you can choose to use velocity (useVelocity: true) instead of a distance preset. This will allow you to chain jumps to your dash to create a "bhop" effect. The strength of these dashes will be determined by horizontalVelocity and verticalVelocity.
Sprint-Walk Mode
When useSprintKey, useAbility2, and useAbility3 are all disabled, the mod uses the sprint-walk trigger system. In this mode, dodges are triggered by tapping the sprint or walk key directly from the player's movement state.
Sprint-walk mode has its own configuration options:
- Tap threshold (
sprintTapThresholdMs): how quickly you need to tap and release (0 = instant) - Walk key (
walk): whether the walk key can trigger dodges - Sprint key (
sprint): whether the sprint key can trigger dodges - Dodge velocity (
horizontalVelocityandverticalVelocity): dash movement speed in this mode (no presets)
Air Dodge
An optional feature for ability-triggered dodges that allows a single mid-air dodge per airborne period.
Air dodging is disabled by default. Enable it via /dodgemodsettings.
Stamina Cost
Each dodge consumes 1.5 stamina and resets your stamina regeneration delay. This prevents dodge spamming and creates a resource management layer.
Creative Dashing
By default, dodging works in Creative mode. This can be configured by changing disableCreativeDash.
Cooldown
The cooldown between dodges is 500ms to prevent spam. This is controlled by dodgeCooldownMs.