SerGreen
Newcomer
Coyote Time* or Jump Grace Period is implemented in the game, but it doesn't work within JunimoKart minigame because of a wrong condition.
Inside of the StardewValley.Minigames.MineCart.MineCartCharacter class there's a method Jump() that makes player jump if they're on the ground OR if jump grace is active:
However, Jump() function itself is called only when the player is on the ground. This happens inside the _Update(float time) function of MineCart.MineCartCharacter:
This means that if the player attempts to jump when not grounded Jump() function is never called and condition this.jumpGracePeriod > 0f is never checked for, so player can never jump within 200 ms of falling of a rail, as intended.
A solution for this issue could be moving the check for jumpGracePeriod from Jump() to _Update(), changing the condition inside _Update() function from
if (this._grounded && this._jumpBuffer > 0f && this._game.isJumpPressed)
to
if ((this._grounded || this.jumpGracePeriod > 0f) && this._jumpBuffer > 0f && this._game.isJumpPressed)
This bug is relevant for Stardew Valley v1.5.6 on Windows. I suspect that it's also present in other versions of the game.
___
* Coyote Time in games is a system that allows player to jump for a short period of time after walking off a platform, as if you were still on the ground. It's used to make platformers more responsive and feel nicer to play.
Inside of the StardewValley.Minigames.MineCart.MineCartCharacter class there's a method Jump() that makes player jump if they're on the ground OR if jump grace is active:
Code:
public void Jump()
{
if (this._grounded || this.jumpGracePeriod > 0f)
{
<jump code>
}
}
Code:
if (this._grounded && this._jumpBuffer > 0f && this._game.isJumpPressed)
{
this._jumpBuffer = 0f;
this.Jump();
}
A solution for this issue could be moving the check for jumpGracePeriod from Jump() to _Update(), changing the condition inside _Update() function from
if (this._grounded && this._jumpBuffer > 0f && this._game.isJumpPressed)
to
if ((this._grounded || this.jumpGracePeriod > 0f) && this._jumpBuffer > 0f && this._game.isJumpPressed)
This bug is relevant for Stardew Valley v1.5.6 on Windows. I suspect that it's also present in other versions of the game.
___
* Coyote Time in games is a system that allows player to jump for a short period of time after walking off a platform, as if you were still on the ground. It's used to make platformers more responsive and feel nicer to play.