mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-26 18:39:08 +00:00
Add More*6 Performance Improvements by Pufferfish
This commit is contained in:
@@ -756,16 +756,20 @@ index d23481453717f715124156b5d83f6448f720d049..6cc6140f44827ccc055aafdd6bfb3a09
|
||||
protected float distance(Node a, Node b) {
|
||||
return a.distanceTo(b);
|
||||
diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java
|
||||
index 1c36dd6bdaa0bc11b0a7e082fdcd2061c19a333b..1203a5efe08cf6b3606f12c60672bd933718d52a 100644
|
||||
index 9845b7397c7c3a1e0229d40c054353c4a489e542..9636d6b7494c937071ea685dad9da06acba6149b 100644
|
||||
--- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java
|
||||
+++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java
|
||||
@@ -323,6 +323,11 @@ public final class LeavesConfig {
|
||||
@@ -331,6 +331,15 @@ public final class LeavesConfig {
|
||||
removeRangeCheckStreams = getBoolean("settings.performance.remove.range-check-streams-and-iterators", removeRangeCheckStreams);
|
||||
}
|
||||
|
||||
+ public static boolean asyncPathfinding = false;
|
||||
+ private static boolean asyncPathfindingLock = false;
|
||||
+ private static void asyncPathfinding() {
|
||||
+ asyncPathfinding = getBoolean("settings.performance.async-pathfinding", asyncPathfinding);
|
||||
+ if (!asyncPathfindingLock) {
|
||||
+ asyncPathfinding = getBoolean("settings.performance.async-pathfinding", asyncPathfinding);
|
||||
+ asyncPathfindingLock = true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
public static final class WorldConfig {
|
||||
|
||||
Reference in New Issue
Block a user