Compare commits
1 Commits
ver/1.20.1
...
build-152
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e196a52ebe |
@@ -1,5 +1,5 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: "Sofiane H. Djerbi" <46628754+kugge@users.noreply.github.com>
|
From: Xymb <xymb@endcrystal.me>
|
||||||
Date: Sat, 17 Jun 2023 19:52:29 +0300
|
Date: Sat, 17 Jun 2023 19:52:29 +0300
|
||||||
Subject: [PATCH] Swap distanceToSqr and EntitySelector
|
Subject: [PATCH] Swap distanceToSqr and EntitySelector
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Xymb <xymb@endcrystal.me>
|
||||||
|
Date: Sat, 17 Jun 2023 21:03:04 +0300
|
||||||
|
Subject: [PATCH] Use Math.floor instead of fastfloot
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
|
index 38441121cf7cdc1d64ef9fc17ae76dc16fbf96f2..3f76e1bc0c08775353d22b7d928536aba9c8ad1d 100644
|
||||||
|
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
|
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
|
@@ -164,13 +164,19 @@ public final class MCUtil {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int fastFloor(double x) {
|
||||||
|
- int truncated = (int)x;
|
||||||
|
- return x < (double)truncated ? truncated - 1 : truncated;
|
||||||
|
+ // Kaiiju start - Use Math.floor instead of fastfloor
|
||||||
|
+ return (int)Math.floor(x); // Kaiiju
|
||||||
|
+ //int truncated = (int)x;
|
||||||
|
+ //return x < (double)truncated ? truncated - 1 : truncated;
|
||||||
|
+ // Kaiiju end
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int fastFloor(float x) {
|
||||||
|
- int truncated = (int)x;
|
||||||
|
- return x < (double)truncated ? truncated - 1 : truncated;
|
||||||
|
+ // Kaiiju start - Use Math.floor instead of fastfloor
|
||||||
|
+ return (int)Math.floor(x); // Kaiiju
|
||||||
|
+ //int truncated = (int)x;
|
||||||
|
+ //return x < (double)truncated ? truncated - 1 : truncated;
|
||||||
|
+ // Kaiiju end
|
||||||
|
}
|
||||||
|
|
||||||
|
public static float normalizeYaw(float f) {
|
||||||
Reference in New Issue
Block a user