Skip to content

Commit

Permalink
Update src/main/java/io/github/thebusybiscuit/slimefun4/api/gps/Telep…
Browse files Browse the repository at this point in the history
…ortationManager.java

Co-authored-by: JustAHuman-xD <[email protected]>
  • Loading branch information
Violet-Nonbloosom and JustAHuman-xD authored Mar 27, 2024
1 parent 701f5bc commit f2aae99
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ public int getTeleportationTime(int complexity, @Nonnull Location source, @Nonnu

// If speed is greater than distance, ultimate time cost must be 1 tick.
// Otherwise, speed WON'T overflow the range of int.
if (speed <= distance)
time = Math.min(distance / (int)speed, 40);

return time;
if (speed <= distance) {
return Math.min(distance / (int) speed, 40);
}
return 1;
}

@ParametersAreNonnullByDefault
Expand Down

0 comments on commit f2aae99

Please sign in to comment.