-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61f2cb8
commit e196a52
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
patches/server/0026-Swap-distanceToSqr-and-EntitySelector.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: "Sofiane H. Djerbi" <[email protected]> | ||
From: Xymb <[email protected]> | ||
Date: Sat, 17 Jun 2023 19:52:29 +0300 | ||
Subject: [PATCH] Swap distanceToSqr and EntitySelector | ||
|
||
|
34 changes: 34 additions & 0 deletions
34
patches/server/0027-Use-Math.floor-instead-of-fastfloot.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Xymb <[email protected]> | ||
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) { |