mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-06 15:51:33 +00:00
Add Async Pathfinding by Pufferfish
This commit is contained in:
@@ -44,6 +44,12 @@ Leaves Modification
|
||||
- Disable method profiler
|
||||
- Disable inactive goal selector
|
||||
- Skip clone loot parameters
|
||||
- Reduce entity allocations
|
||||
- Remove lambda from ticking guard
|
||||
- Remove iterators from inventory contains
|
||||
- Remove streams from getting nearby players
|
||||
- Remove streams and iterators from range check
|
||||
- Async Pathfinding
|
||||
|
||||
> Powered by [Purpur](https://github.com/PurpurMC/Purpur)
|
||||
- Don't send useless entity packets
|
||||
@@ -44,6 +44,12 @@ Leaves Modification
|
||||
- 关闭方法分析器
|
||||
- 禁用非活跃实体的目标选择器
|
||||
- 跳过战利品表参数复制
|
||||
- 减少实体分配
|
||||
- 删除部分lambda表达式
|
||||
- 删除容器检查中的iterators
|
||||
- 删除玩家检测中的流
|
||||
- 删除范围检查中的流和iterators
|
||||
- 异步实体寻路
|
||||
|
||||
> Powered by [Purpur](https://github.com/PurpurMC/Purpur)
|
||||
- 减少不必要包的发送
|
||||
|
||||
@@ -203,10 +203,10 @@ index 26e23a21f7cbd8d5e9a2dbf4860adc03a04e6e0e..51130d4d0f95af0d3ee508e83e696977
|
||||
public final String worldName;
|
||||
diff --git a/src/main/java/top/leavesmc/leaves/tracker/MultithreadedTracker.java b/src/main/java/top/leavesmc/leaves/tracker/MultithreadedTracker.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..28a6470c070b7a2fc49b7d19c4fd7dff90e668b4
|
||||
index 0000000000000000000000000000000000000000..6f0ef15bf132d727e1fe87e336f83ec26f1a1f74
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/top/leavesmc/leaves/tracker/MultithreadedTracker.java
|
||||
@@ -0,0 +1,122 @@
|
||||
@@ -0,0 +1,123 @@
|
||||
+package top.leavesmc.leaves.tracker;
|
||||
+
|
||||
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
@@ -222,6 +222,7 @@ index 0000000000000000000000000000000000000000..28a6470c070b7a2fc49b7d19c4fd7dff
|
||||
+import java.util.concurrent.Executors;
|
||||
+import java.util.concurrent.atomic.AtomicInteger;
|
||||
+
|
||||
+// Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)
|
||||
+public class MultithreadedTracker {
|
||||
+
|
||||
+ private static final int parallelism = Math.max(4, Runtime.getRuntime().availableProcessors());
|
||||
|
||||
1180
patches/server/0039-Async-Pathfinding.patch
Normal file
1180
patches/server/0039-Async-Pathfinding.patch
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user