Buggy code:
public int morePacketsVehicleTaskId = - 1 ; public float noFallFallDistance = 0 ; public double noFallMaxY = 0 ; public boolean noFallAssumeGround = false ; public boolean noFallSkipAirCheck = false ; public double passableVL ; public double sfHorizontalBuffer = 0.0 ; public int lostSprintCount = 0 ; public int sfJumpPhase = 0 ; public boolean sfDirty = false ; public boolean sfLowJump = false ; public boolean sfNoLowJump = false ; public double sfLastYDist = Double . MAX_VALUE ; public double sfLastHDist = Double . MAX_VALUE ; public int sfHoverTicks = - 1 ; public int sfHoverLoginTicks = 0 ; public int sfOnIce = 0 ; public long sfCobwebTime = 0 ; public double sfCobwebVL = 0 ; public long sfVLTime = 0 ; public final ActionAccumulator vDistAcc = new ActionAccumulator ( 3 , 3 ) ; public boolean wasInVehicle = false ; public MoveConsistency vehicleConsistency = MoveConsistency . INCONSISTENT ; public MovingData ( final MovingConfig config ) { } public void clearFlyData ( ) { } public void onSetBack ( final Location setBack ) { } public void prepareSetBack ( final Location loc ) { } public void resetPositions ( final Location loc ) { } public void resetPositions ( PlayerLocation loc ) { } public void resetPositions ( final double x , final double y , final double z ) { } public void clearAccounting ( ) { } public void clearMorePacketsData ( ) { } public void clearNoFallData ( ) { } public void setSetBack ( final PlayerLocation loc ) { } public void setSetBack ( final Location loc ) { } public Location getSetBack ( final Location ref ) { } public Location getSetBack ( final PlayerLocation ref ) { } public boolean hasSetBack ( ) { } public boolean hasSetBackWorldChanged ( final Location loc ) { } public double getSetBackX ( ) { } public double getSetBackY ( ) { } public double getSetBackZ ( ) { } public void setSetBackY ( final double y ) { } public final Location getTeleported ( ) { } public final void setTeleported ( final Location loc ) { } public boolean hasMorePacketsSetBack ( ) { } public final void setMorePacketsSetBack ( final PlayerLocation loc ) { } public final void setMorePacketsSetBack ( final Location loc ) { } public Location getMorePacketsSetBack ( ) { } public boolean hasMorePacketsVehicleSetBack ( ) { } public final void setMorePacketsVehicleSetBack ( final PlayerLocation loc ) { } public final void setMorePacketsVehicleSetBack ( final Location loc ) { } public final Location getMorePacketsVehicleSetBack ( ) { } public final void resetTeleported ( ) { } public final void resetSetBack ( ) { } public final void setTo ( final Location to ) { } public void addHorizontalVelocity ( final Velocity vel ) { } public void removeAllVelocity ( ) { } public void removeInvalidVelocity ( final int tick ) { } public void clearActiveHorVel ( ) { } public void clearActiveVerVel ( ) { } public boolean hasActiveHorVel ( ) { } public boolean hasQueuedHorVel ( ) { } public void velocityTick ( ) { } public double getHorizontalFreedom ( ) { } public double useHorizontalVelocity ( final double amount ) { } public void addHorizontalVelocity ( final StringBuilder builder ) { } public boolean isSetBack ( final Location loc ) { } public void onPlayerLeave ( ) { } public void onWorldUnload ( final String worldName ) { } public void adjustWalkSpeed ( final float walkSpeed , final int tick , final int speedGrace ) { } public void adjustFlySpeed ( final float flySpeed , final int tick , final int speedGrace ) { } public boolean hasTrace ( ) { } public LocationTrace getTrace ( final Player player ) { } public void resetTrace ( final Player player , final Location loc , final long time ) { } public LocationTrace updateTrace ( final Player player , final Location loc , final long time ) { } public void resetTrace ( final Location loc , final long time , final int size , double mergeDist ) { } public void deleteTrace ( ) { } public void addVelocity ( final Player player , final MovingConfig cc , final double vx , final double vy , final double vz ) { final int tick = TickTask . getTick ( ) ; removeInvalidVelocity ( ( tick - ( cc . velocityActivationTicks ) ) ) ; if ( debug ) { NCPAPIProvider . getNoCheatPlusAPI ( ) . getLogManager ( ) . debug ( TRACE_FILE , ( ( ( ( ( ( ( player . getName ( ) ) + "<seq2seq4repair_space>new<seq2seq4repair_space>velocity:<seq2seq4repair_space>" ) + vx ) + ",<seq2seq4repair_space>" ) + vy ) + ",<seq2seq4repair_space>" ) + vz ) ) ; } boolean used = false ; if ( vy > 0.0 ) { used = true ; if ( ( ( verticalFreedom ) <= 0.001 ) && ( ( verticalVelocityCounter ) >= 0 ) ) { verticalVelocity = 0 ; } verticalVelocity += vy ; verticalFreedom += verticalVelocity ; verticalVelocityCounter = Math . min ( 100 , ( ( ( Math . max ( verticalVelocityCounter , cc . velocityGraceTicks ) ) + 1 ) + ( ( int ) ( Math . round ( ( vy * 10.0 ) ) ) ) ) ) ; verticalVelocityUsed = 0 ; } <START_BUG> if ( ( vx != 0.0 ) && ( vz != 0.0 ) ) { <END_BUG> final double newVal = Math . sqrt ( ( ( vx * vx ) + ( vz * vz ) ) ) ; used = true ; final Velocity vel = new Velocity ( tick , newVal , cc . velocityActivationCounter , Math . max ( 20 , ( 1 + ( ( int ) ( Math . round ( ( newVal * 10.0 ) ) ) ) ) ) ) ; addHorizontalVelocity ( vel ) ; } if ( used ) { sfDirty = true ; sfNoLowJump = true ; } } }

Fix:
if ( ( vx != 0.0 ) || ( vz != 0.0 ) ) {