Skip to content

Commit

Permalink
Don't force resync when jumping after setback inside of water or lava
Browse files Browse the repository at this point in the history
  • Loading branch information
MWHunter committed Oct 29, 2023
1 parent c22ec08 commit fb56a31
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,9 @@ private void check(PositionUpdate update) {
// A player must have velocity going INTO the ground to be able to jump
// Otherwise they could ignore upwards velocity that isn't useful into more useful upwards velocity (towering)
// So if they are supposed to be going upwards, or are supposed to be off the ground, resync
if (player.predictedVelocity.isJump() && ((setbackVel != null && setbackVel.getY() >= 0) || !Collisions.slowCouldPointThreeHitGround(player, player.lastX, player.lastY, player.lastZ))) {
if (player.predictedVelocity.isJump()
&& !player.wasTouchingLava && !player.wasTouchingWater
&& ((setbackVel != null && setbackVel.getY() >= 0) || !Collisions.slowCouldPointThreeHitGround(player, player.lastX, player.lastY, player.lastZ))) {
player.getSetbackTeleportUtil().executeForceResync();
}
// Player ignored the knockback or is delaying it a tick... bad!
Expand Down

0 comments on commit fb56a31

Please sign in to comment.