1.21.1-NF: vault no longer cancels fast run#485
Conversation
When vaulting, vanilla Minecraft cancels the sprint state due to the horizontal block collision in the first 1-2 ticks of the vault animation. This causes FastRun.canContinue() to fail (it requires player.isSprinting()), stopping the fast run mid-vault. Register a sprint cancel marker in Vault.onStartInLocalClient so that the LivingEntityMixin setSprinting hook blocks vanilla's cancellation for the duration of the vault (marker remains while isDoing() is true). This follows the same pattern already used by RideZipline.
|
If I remember correctly |
|
Thanks for looking at it, and no rush at all on merging! You're right that in RideZipline In this PR I register the marker without calling If you'd rather not reuse the marker in the opposite direction like this, I'm open to a different approach — just let me know what fits ParCool best. And totally fine to put off merging. Since the v4 rewrite on 1.19.2 reworks most of the basic system (and will flow up into this branch), please take your time. Once v4 is ready I'm happy to rebase or reimplement this on top of the new system, so just tell me if the fast-run-after-vault behavior still needs attention then. |
Vaulting over obstacles cancels vanilla sprint due to horizontal block collision in the first couple ticks of the vault animation. Since FastRun.canContinue() requires player.isSprinting(), this caused fast run to stop mid-vault, leaving the player walking after the vault completes.
The fix registers a sprint cancel marker in Vault.onStartInLocalClient so that the LivingEntityMixin setSprinting hook blocks vanilla's cancellation for the duration of the vault. This is the same pattern already used by RideZipline.