Files
paper-mc/paper-server/patches/sources/net/minecraft/server/commands/LocateCommand.java.patch
Bjarne Koll b745ab65e6 Begin 1.21.6-pre1
Initial move of patches to rejected and non rejected source patches to
publish to patch-roulette.
2025-05-28 13:23:32 +02:00

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
}
}