mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-12 17:59:16 +00:00
Co-authored-by: Bjarne Koll <git@lynxplay.dev> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Co-authored-by: Noah van der Aa <ndvdaa@gmail.com> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
11 lines
367 B
Diff
11 lines
367 B
Diff
--- a/net/minecraft/server/commands/LocateCommand.java
|
|
+++ b/net/minecraft/server/commands/LocateCommand.java
|
|
@@ -199,6 +_,6 @@
|
|
private static float dist(int x1, int z1, int x2, int z2) {
|
|
int i = x2 - x1;
|
|
int i1 = z2 - z1;
|
|
- return Mth.sqrt(i * i + i1 * i1);
|
|
+ return (float) Math.hypot(i, i1); // Paper - Fix MC-177381
|
|
}
|
|
}
|