Skip to content

Commit

Permalink
rename variable as it is not squared
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Jan 24, 2024
1 parent 6c41876 commit d261abc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ public Location getFrom(PlayerMoveEvent event) {
}

public double getBlocksPerTick(PlayerMoveEvent event) {
double eventSpeedSquared = LocationUtil.getNormalizedDistance(event.getTo(), event.getFrom());
double eventSpeed = LocationUtil.getNormalizedDistance(event.getTo(), event.getFrom());
if (doIntervalCheck) {
Double speedInterval = PLAYER_SPEEDS_INTERVAL.getIfPresent(event.getPlayer().getUniqueId());
if (speedInterval != null) return FastMath.max(speedInterval, eventSpeedSquared);
if (speedInterval != null) return FastMath.max(speedInterval, eventSpeed);
}
return eventSpeedSquared;
return eventSpeed;
}

public boolean isInNewChunks(UUID playerUniqueId) {
Expand Down

0 comments on commit d261abc

Please sign in to comment.