Skip to content

Commit

Permalink
fix interval check speed detection
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Jan 27, 2024
1 parent 2c10c64 commit 26ca07c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private void run() {
Location lastLocation = this.LAST_GLIDE_POS.getIfPresent(player.getUniqueId());
if (lastLocation != null) this.PLAYER_SPEEDS.put(
player.getUniqueId(),
calculate3D ? LocationUtil.getRelDistance3D(lastLocation, currentLocation) : LocationUtil.getRelDistance2D(lastLocation, currentLocation) / checkIntervalTicks
(calculate3D ? LocationUtil.getRelDistance3D(lastLocation, currentLocation) : LocationUtil.getRelDistance2D(lastLocation, currentLocation)) / checkIntervalTicks
);
this.LAST_GLIDE_POS.put(player.getUniqueId(), currentLocation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void run() {
Location lastLocation = LAST_GLIDE_POS.getIfPresent(player.getUniqueId());
if (lastLocation != null) this.PLAYER_SPEEDS.put(
player.getUniqueId(),
calculate3D ? LocationUtil.getRelDistance3D(lastLocation, currentLocation) : LocationUtil.getRelDistance2D(lastLocation, currentLocation) / checkIntervalTicks
(calculate3D ? LocationUtil.getRelDistance3D(lastLocation, currentLocation) : LocationUtil.getRelDistance2D(lastLocation, currentLocation)) / checkIntervalTicks
);
LAST_GLIDE_POS.put(player.getUniqueId(), currentLocation);
}
Expand Down

0 comments on commit 26ca07c

Please sign in to comment.