diff --git a/patches/server/0021-Multithreaded-Tracker.patch b/patches/server/0021-Multithreaded-Tracker.patch index 7c7b5fe8..fea24468 100644 --- a/patches/server/0021-Multithreaded-Tracker.patch +++ b/patches/server/0021-Multithreaded-Tracker.patch @@ -186,10 +186,10 @@ index 8eb4a062489b42b26076d5f3bdfbff368c1a199b..441edf3dbd34c8d15b7b1ba02c92e8f1 set.clear(); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index f4e5b84f0bd952676950369eff44b87fe1c46f1b..6cff1d44bbbdf998b79c17a5fd78b084d49ce988 100644 +index f4e5b84f0bd952676950369eff44b87fe1c46f1b..c9adf62da15389d2548f8f4540395f73dcdf243f 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -237,6 +237,19 @@ public final class LeavesConfig { +@@ -237,6 +237,20 @@ public final class LeavesConfig { dontSendUselessEntityPackets = getBoolean("settings.performance.dont-send-useless-entity-packets", dontSendUselessEntityPackets); } @@ -202,7 +202,8 @@ index f4e5b84f0bd952676950369eff44b87fe1c46f1b..6cff1d44bbbdf998b79c17a5fd78b084 + } + + if (asyncEntityTracker) { -+ LeavesLogger.LOGGER.severe("Async EntityTracker is updating, it may work normally"); ++ asyncEntityTracker = false; ++ LeavesLogger.LOGGER.severe("Async EntityTracker is updating, it can't work"); + } + } + @@ -211,10 +212,10 @@ index f4e5b84f0bd952676950369eff44b87fe1c46f1b..6cff1d44bbbdf998b79c17a5fd78b084 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..6f0ef15bf132d727e1fe87e336f83ec26f1a1f74 +index 0000000000000000000000000000000000000000..559daa0150e395921d110efc63c477be0248ad25 --- /dev/null +++ b/src/main/java/top/leavesmc/leaves/tracker/MultithreadedTracker.java -@@ -0,0 +1,123 @@ +@@ -0,0 +1,125 @@ +package top.leavesmc.leaves.tracker; + +import com.google.common.util.concurrent.ThreadFactoryBuilder; @@ -318,6 +319,7 @@ index 0000000000000000000000000000000000000000..6f0ef15bf132d727e1fe87e336f83ec2 + } + + private void processChunk(LevelChunk chunk) { ++ /* Updating DISABLE THIS + final ChunkEntitySlices entitySlices = chunk.level.entityManager.entitySliceManager.getChunk(chunk.locX, chunk.locZ); + if (entitySlices == null) { + return; @@ -336,5 +338,6 @@ index 0000000000000000000000000000000000000000..6f0ef15bf132d727e1fe87e336f83ec2 + } + } + } ++ */ + } +} diff --git a/patches/server/0022-Fix-Paper-6045-block-goal-shouldn-t-load-chunks.patch b/patches/server/0022-Fix-Paper-6045-block-goal-shouldn-t-load-chunks.patch index 72e051bd..52781197 100644 --- a/patches/server/0022-Fix-Paper-6045-block-goal-shouldn-t-load-chunks.patch +++ b/patches/server/0022-Fix-Paper-6045-block-goal-shouldn-t-load-chunks.patch @@ -18,10 +18,10 @@ index 26bf383caea68834c654b25653ced9017f1b1b22..71e3c7fc5c071e83dfeca6954771e559 this.blockPos = mutableBlockPos; setTargetPosition(mutableBlockPos.immutable()); // Paper diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 6cff1d44bbbdf998b79c17a5fd78b084d49ce988..d4a3fbec4311947647b479db4cdc75ef0e508d91 100644 +index c9adf62da15389d2548f8f4540395f73dcdf243f..3907bbfae224be1467bead2e13a7eace7e75e579 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -250,6 +250,11 @@ public final class LeavesConfig { +@@ -251,6 +251,11 @@ public final class LeavesConfig { } } diff --git a/patches/server/0023-Optimize-entity-coordinate-key.patch b/patches/server/0023-Optimize-entity-coordinate-key.patch index 73951855..3a68ed02 100644 --- a/patches/server/0023-Optimize-entity-coordinate-key.patch +++ b/patches/server/0023-Optimize-entity-coordinate-key.patch @@ -38,10 +38,10 @@ index efa899ed25ab0a09d9d6a6fc88c02f54bc3aef40..efbf618db7b8418c4e3f55b16c25e69a private Vec3 deltaMovement; private float yRot; diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index d4a3fbec4311947647b479db4cdc75ef0e508d91..4d4bded4a24baecd87048bbf37ff513084f400b5 100644 +index 3907bbfae224be1467bead2e13a7eace7e75e579..c234e6de433fa83055edc87c02e1d935cf3860df 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -255,6 +255,11 @@ public final class LeavesConfig { +@@ -256,6 +256,11 @@ public final class LeavesConfig { fixPaper6045 = getBoolean("settings.performance.fix.fix-paper-6045", fixPaper6045); } diff --git a/patches/server/0024-Optimize-suffocation.patch b/patches/server/0024-Optimize-suffocation.patch index 4aab1e64..ae895c8b 100644 --- a/patches/server/0024-Optimize-suffocation.patch +++ b/patches/server/0024-Optimize-suffocation.patch @@ -35,10 +35,10 @@ index 476afe131aa60d91a2d43fd04c55ab591b03337b..c23e0c6b740878e035a1b84a31bfaa3a public boolean hurt(DamageSource source, float amount) { if (this.isInvulnerableTo(source)) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 4d4bded4a24baecd87048bbf37ff513084f400b5..4b6def149a55882ba6be5c875aa9661b07119621 100644 +index c234e6de433fa83055edc87c02e1d935cf3860df..64fc662bcf102df1fd971e9bc72b96ebfe3cda32 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -260,6 +260,11 @@ public final class LeavesConfig { +@@ -261,6 +261,11 @@ public final class LeavesConfig { optimizeEntityCoordinateKey = getBoolean("settings.performance.optimize-entity-coordinate-key", optimizeEntityCoordinateKey); } diff --git a/patches/server/0025-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch b/patches/server/0025-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch index 30a9a556..36f37f7a 100644 --- a/patches/server/0025-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch +++ b/patches/server/0025-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch @@ -142,10 +142,10 @@ index a69b428d5465b2e434bfd21cd935997c1871bbb6..22838524727a1755739d056b726cf832 return pos.isInsideBuildHeightAndWorldBoundsHorizontal(this); // Paper - use better/optimized check } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 4b6def149a55882ba6be5c875aa9661b07119621..7fa6e2c9c49e2676536abbd4d9414b8969ac2b77 100644 +index 64fc662bcf102df1fd971e9bc72b96ebfe3cda32..d170232e4da4c67c343f3e4393ae7153e0b3002e 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -265,6 +265,11 @@ public final class LeavesConfig { +@@ -266,6 +266,11 @@ public final class LeavesConfig { enableSuffocationOptimization = getBoolean("settings.performance.enable-suffocation-optimization", enableSuffocationOptimization); } diff --git a/patches/server/0026-Only-check-for-spooky-season-once-an-hour.patch b/patches/server/0026-Only-check-for-spooky-season-once-an-hour.patch index 17326a32..b514c2a8 100644 --- a/patches/server/0026-Only-check-for-spooky-season-once-an-hour.patch +++ b/patches/server/0026-Only-check-for-spooky-season-once-an-hour.patch @@ -45,10 +45,10 @@ index 50d4595b81f24949011c7565c5e3fc8c26c86019..8de1653e3fbf29e9de550a1976344bd8 @Override protected float getStandingEyeHeight(Pose pose, EntityDimensions dimensions) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 7fa6e2c9c49e2676536abbd4d9414b8969ac2b77..179e8370fea6a3d18e6efcaa31d605a1f95b5b25 100644 +index d170232e4da4c67c343f3e4393ae7153e0b3002e..7c2d8f57704cbefbf6231848c5e31553e43ca02c 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -270,6 +270,11 @@ public final class LeavesConfig { +@@ -271,6 +271,11 @@ public final class LeavesConfig { entityStripRaytracing = getBoolean("settings.performance.strip-raytracing-for-entity", entityStripRaytracing); } diff --git a/patches/server/0028-Optimize-random-calls-in-chunk-ticking.patch b/patches/server/0028-Optimize-random-calls-in-chunk-ticking.patch index f710e97e..95660c69 100644 --- a/patches/server/0028-Optimize-random-calls-in-chunk-ticking.patch +++ b/patches/server/0028-Optimize-random-calls-in-chunk-ticking.patch @@ -93,10 +93,10 @@ index 05499ae9fc331471db6e763a2adb46b5da8522d3..50de53684c27faa4bceeaf081b414c60 public org.bukkit.Chunk bukkitChunk; diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 179e8370fea6a3d18e6efcaa31d605a1f95b5b25..c4384a5b5971660a72cd784581c2fcc8d44fcfcd 100644 +index 7c2d8f57704cbefbf6231848c5e31553e43ca02c..3647b4fe0d875af39bf55c5f8bf1bd9cf08709a8 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -275,6 +275,15 @@ public final class LeavesConfig { +@@ -276,6 +276,15 @@ public final class LeavesConfig { checkSpookySeasonOnceAnHour = getBoolean("settings.performance.check-spooky-season-once-an-hour", checkSpookySeasonOnceAnHour); } diff --git a/patches/server/0029-Skip-POI-finding-if-stuck-in-vehicle.patch b/patches/server/0029-Skip-POI-finding-if-stuck-in-vehicle.patch index adebe8a0..2d143057 100644 --- a/patches/server/0029-Skip-POI-finding-if-stuck-in-vehicle.patch +++ b/patches/server/0029-Skip-POI-finding-if-stuck-in-vehicle.patch @@ -18,10 +18,10 @@ index 43243537b765a2d270be6de3f053fea77ff67d18..7d8a137068ab2b33690c369f4da46e90 this.batchCache.long2ObjectEntrySet().removeIf((entry) -> { return !entry.getValue().isStillValid(time); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index c4384a5b5971660a72cd784581c2fcc8d44fcfcd..073b79855e8c2def9a8e717e16bd753f4b205ed2 100644 +index 3647b4fe0d875af39bf55c5f8bf1bd9cf08709a8..179cb93d9dc77bcfef6a8d6bc73a3290483a67f5 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -284,6 +284,11 @@ public final class LeavesConfig { +@@ -285,6 +285,11 @@ public final class LeavesConfig { } } diff --git a/patches/server/0030-Early-return-optimization-for-target-finding.patch b/patches/server/0030-Early-return-optimization-for-target-finding.patch index 48573510..baf17ad1 100644 --- a/patches/server/0030-Early-return-optimization-for-target-finding.patch +++ b/patches/server/0030-Early-return-optimization-for-target-finding.patch @@ -29,10 +29,10 @@ index a7575b5ef56af6f53448d391abb4956e130148ca..e2764cbc888be39943728ff810e1e44b return false; } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 073b79855e8c2def9a8e717e16bd753f4b205ed2..f1602f3856be8eb3e9369b6fd714332f1b1a51d4 100644 +index 179cb93d9dc77bcfef6a8d6bc73a3290483a67f5..3e06ad7a31d6f35a55f8c2e6b9d2a666618168ab 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -288,6 +288,11 @@ public final class LeavesConfig { +@@ -289,6 +289,11 @@ public final class LeavesConfig { private static void skipPOIFindingInVehicle() { skipPOIFindingInVehicle = getBoolean("settings.performance.skip-poi-find-in-vehicle", skipPOIFindingInVehicle); } diff --git a/patches/server/0031-Use-thread-unsafe-random-for-mob-spawning.patch b/patches/server/0031-Use-thread-unsafe-random-for-mob-spawning.patch index 41ddce3f..f441f0b1 100644 --- a/patches/server/0031-Use-thread-unsafe-random-for-mob-spawning.patch +++ b/patches/server/0031-Use-thread-unsafe-random-for-mob-spawning.patch @@ -38,10 +38,10 @@ index df83b6f0e217eec4c9e9707be0030c129fdeb545..e41e87258da5594c5ec164d76bb59bb3 public static boolean isValidEmptySpawnBlock(BlockGetter blockView, BlockPos pos, BlockState state, FluidState fluidState, EntityType entityType) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index f1602f3856be8eb3e9369b6fd714332f1b1a51d4..bc597a8abbc7f5adef832c80633b0c9fc560dbe5 100644 +index 3e06ad7a31d6f35a55f8c2e6b9d2a666618168ab..4f5717d181c591b03cf78694a95e64be982517d8 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -294,6 +294,11 @@ public final class LeavesConfig { +@@ -295,6 +295,11 @@ public final class LeavesConfig { entityTargetFindingOptimization = getBoolean("settings.performance.entity-target-find-optimization", entityTargetFindingOptimization); } diff --git a/patches/server/0032-Config-to-disable-method-profiler.patch b/patches/server/0032-Config-to-disable-method-profiler.patch index 6d1c2cc8..9ec5abc2 100644 --- a/patches/server/0032-Config-to-disable-method-profiler.patch +++ b/patches/server/0032-Config-to-disable-method-profiler.patch @@ -38,10 +38,10 @@ index 2e19e8cf66063a789770531fe399d81ebb20cfda..2668f11411b4f95fd254b139e758a563 } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index bc597a8abbc7f5adef832c80633b0c9fc560dbe5..d3ee7c7192ca360e28da3616735588ca8938db51 100644 +index 4f5717d181c591b03cf78694a95e64be982517d8..89ec4bd328fe08407552f4e26d6ac4586fd1d697 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -299,6 +299,11 @@ public final class LeavesConfig { +@@ -300,6 +300,11 @@ public final class LeavesConfig { useMoreThreadUnsafeRandom = getBoolean("settings.performance.use-more-thread-unsafe-random", useMoreThreadUnsafeRandom); } diff --git a/patches/server/0033-Throttle-goal-selector-during-inactive-ticking.patch b/patches/server/0033-Throttle-goal-selector-during-inactive-ticking.patch index 1618366a..8007829f 100644 --- a/patches/server/0033-Throttle-goal-selector-during-inactive-ticking.patch +++ b/patches/server/0033-Throttle-goal-selector-during-inactive-ticking.patch @@ -25,10 +25,10 @@ index fffa6ba329b38433a1df51df339df652d3fda828..f65bdf9a94db15b8b82a6f8dd729fb43 } if (this.targetSelector.inactiveTick()) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index d3ee7c7192ca360e28da3616735588ca8938db51..0ebb6d850db85af9d9c1caaca90caae246f3ac14 100644 +index 89ec4bd328fe08407552f4e26d6ac4586fd1d697..c21ba7b31a6ee4599f0e7e0b2dbf4a5e46a53a19 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -304,6 +304,11 @@ public final class LeavesConfig { +@@ -305,6 +305,11 @@ public final class LeavesConfig { disableMethodProfiler = getBoolean("settings.misc.disable-method-profiler", disableMethodProfiler); } diff --git a/patches/server/0034-Skip-cloning-loot-parameters.patch b/patches/server/0034-Skip-cloning-loot-parameters.patch index 63500972..1d4ca73a 100644 --- a/patches/server/0034-Skip-cloning-loot-parameters.patch +++ b/patches/server/0034-Skip-cloning-loot-parameters.patch @@ -28,10 +28,10 @@ index 35f9b11a3a61976c952a2c1c64bb2a932538f54f..5d678cfca0a39aeed0881c3a38828fdc public boolean hasParam(LootContextParam parameter) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 0ebb6d850db85af9d9c1caaca90caae246f3ac14..8b91e65c765a8293da39d64e564349ebdd7c94ca 100644 +index c21ba7b31a6ee4599f0e7e0b2dbf4a5e46a53a19..0bba3458e6fc75a9d542691054cc255a521496c6 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -309,6 +309,11 @@ public final class LeavesConfig { +@@ -310,6 +310,11 @@ public final class LeavesConfig { throttleInactiveGoalSelectorTick = getBoolean("settings.performance.inactive-goal-selector-disable", throttleInactiveGoalSelectorTick); } diff --git a/patches/server/0035-Reduce-entity-allocations.patch b/patches/server/0035-Reduce-entity-allocations.patch index 1457ca7c..5b3b433a 100644 --- a/patches/server/0035-Reduce-entity-allocations.patch +++ b/patches/server/0035-Reduce-entity-allocations.patch @@ -54,10 +54,10 @@ index c770ee21b7b699522941f6a1584d532001c04082..a0672f21797ff90e8bb6b16d3aaa671b public boolean hasAttribute(Attribute attribute) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 8b91e65c765a8293da39d64e564349ebdd7c94ca..4b5847dbbe0aee10e232d5a5da0f760f22a63898 100644 +index 0bba3458e6fc75a9d542691054cc255a521496c6..a557ea7adbb82dfff5c383b1d9acb8e0487fd4e9 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -314,6 +314,11 @@ public final class LeavesConfig { +@@ -315,6 +315,11 @@ public final class LeavesConfig { skipCloneLootParameters = getBoolean("settings.performance.skip-clone-loot-parameters", skipCloneLootParameters); } diff --git a/patches/server/0036-Remove-lambda-from-ticking-guard.patch b/patches/server/0036-Remove-lambda-from-ticking-guard.patch index 99e896ce..4f318771 100644 --- a/patches/server/0036-Remove-lambda-from-ticking-guard.patch +++ b/patches/server/0036-Remove-lambda-from-ticking-guard.patch @@ -36,10 +36,10 @@ index 114bc179c5ff436801c4f6bfeacf71c74d4d3f37..7dac4b8c61db0bbce81a8fd85ed87796 } } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 4b5847dbbe0aee10e232d5a5da0f760f22a63898..623345d9aaa4d47c51351dc0c921791eda8191b1 100644 +index a557ea7adbb82dfff5c383b1d9acb8e0487fd4e9..92fae1f8b08038d4451643aaedaa63a000a32034 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -319,6 +319,11 @@ public final class LeavesConfig { +@@ -320,6 +320,11 @@ public final class LeavesConfig { reduceEntityAllocations = getBoolean("settings.performance.reduce-entity-allocations", reduceEntityAllocations); } diff --git a/patches/server/0037-Remove-iterators-from-inventory-contains.patch b/patches/server/0037-Remove-iterators-from-inventory-contains.patch index 3cea43dc..a5be7887 100644 --- a/patches/server/0037-Remove-iterators-from-inventory-contains.patch +++ b/patches/server/0037-Remove-iterators-from-inventory-contains.patch @@ -55,10 +55,10 @@ index a1a625a8dacf4d2bbf75ddd90dce1b1be663c919..038c5fae763c5d387a23aaacc3264ab3 } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 623345d9aaa4d47c51351dc0c921791eda8191b1..3e59fc8a015b1b44db36550014b16b2196c80280 100644 +index 92fae1f8b08038d4451643aaedaa63a000a32034..914744995ff7637f063afe1a45d577f41d2c30d9 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -324,6 +324,11 @@ public final class LeavesConfig { +@@ -325,6 +325,11 @@ public final class LeavesConfig { removeTickGuardLambda = getBoolean("settings.performance.remove.tick-guard-lambda", removeTickGuardLambda); } diff --git a/patches/server/0038-Remove-streams-from-getting-nearby-players.patch b/patches/server/0038-Remove-streams-from-getting-nearby-players.patch index 57dd6b26..90f41687 100644 --- a/patches/server/0038-Remove-streams-from-getting-nearby-players.patch +++ b/patches/server/0038-Remove-streams-from-getting-nearby-players.patch @@ -68,10 +68,10 @@ index c3e148375f5185cb82956b44406346daad24c28f..3d8a51337b87c246a32dde2e84a4d9e6 return chunkMap.playerEntityTrackerTrackMaps[type.ordinal()].getObjectsInRange(MCUtil.getCoordinateKey(this)); } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 3e59fc8a015b1b44db36550014b16b2196c80280..eadc86f2dfb004901ba75c704bc36f2887ae3acd 100644 +index 914744995ff7637f063afe1a45d577f41d2c30d9..c83b3b5fb99a9730632e03f0f7d2d4e4ac510049 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -329,6 +329,11 @@ public final class LeavesConfig { +@@ -330,6 +330,11 @@ public final class LeavesConfig { removeInventoryContainsIterators = getBoolean("settings.performance.remove.inventory-contains-iterators", removeInventoryContainsIterators); } diff --git a/patches/server/0039-Remove-streams-and-iterators-from-range-check.patch b/patches/server/0039-Remove-streams-and-iterators-from-range-check.patch index e6eaf984..f2fa2c51 100644 --- a/patches/server/0039-Remove-streams-and-iterators-from-range-check.patch +++ b/patches/server/0039-Remove-streams-and-iterators-from-range-check.patch @@ -65,10 +65,10 @@ index 9756f436877992bf56719d023a0ff9a6f41b7bc4..bb39a68ba84c19530dd891c2035b9eda return this.scaledRange(i); } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index eadc86f2dfb004901ba75c704bc36f2887ae3acd..51671e26df1d041e88484d9ab48e447ed227055d 100644 +index c83b3b5fb99a9730632e03f0f7d2d4e4ac510049..6924ca89da0decc8f861842b770d0cfae7fc0ba1 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -334,6 +334,11 @@ public final class LeavesConfig { +@@ -335,6 +335,11 @@ public final class LeavesConfig { removeGetNearPlayerStreams = getBoolean("settings.performance.remove.get-nearby-players-streams", removeGetNearPlayerStreams); } diff --git a/patches/server/0040-Async-Pathfinding.patch b/patches/server/0040-Async-Pathfinding.patch index c1d8eb98..1373cd04 100644 --- a/patches/server/0040-Async-Pathfinding.patch +++ b/patches/server/0040-Async-Pathfinding.patch @@ -393,7 +393,7 @@ index f0248d839255763005ba333b0bfcf691407fb69b..9b1ef3c365d1523ec5dafa6f57b56d7d @Override diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java -index c1781c92ff59f0c9eb47cbbef01e3252c5e1a1bf..e90d9e189f8543cb8f3fb9e338625ad0cbf7365e 100644 +index c1781c92ff59f0c9eb47cbbef01e3252c5e1a1bf..6faf6154dcbad4b9c30168612f603fdab6560454 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java @@ -150,6 +150,9 @@ public abstract class PathNavigation { @@ -474,18 +474,6 @@ index c1781c92ff59f0c9eb47cbbef01e3252c5e1a1bf..e90d9e189f8543cb8f3fb9e338625ad0 protected void followThePath() { Vec3 vec3 = this.getTempMobPos(); this.maxDistanceToWaypoint = this.mob.getBbWidth() > 0.75F ? this.mob.getBbWidth() / 2.0F : 0.75F - this.mob.getBbWidth() / 2.0F; -@@ -435,4 +464,11 @@ public abstract class PathNavigation { - public boolean isStuck() { - return this.isStuck; - } -+ -+ // Paper start -+ public boolean isViableForPathRecalculationChecking() { -+ return !this.needsPathRecalculation() && -+ (this.path != null && (!top.leavesmc.leaves.LeavesConfig.asyncPathfinding || this.path.isProcessed()) && !this.path.isDone() && this.path.getNodeCount() != 0); // Leaves -+ } -+ // Paper end - } diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java index 8db20db72cd51046213625fac46c35854c59ec5d..28040c76ec4216a425e2c6c7216f96a006f10085 100644 --- a/src/main/java/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java @@ -759,10 +747,10 @@ 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 51671e26df1d041e88484d9ab48e447ed227055d..12b9b7af94e2b1f2fdc936235a3a596ca18dc465 100644 +index 6924ca89da0decc8f861842b770d0cfae7fc0ba1..84bbe8d232be70c87e460b5ef28fca1b7d17f32d 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -339,6 +339,19 @@ public final class LeavesConfig { +@@ -340,6 +340,20 @@ public final class LeavesConfig { removeRangeCheckStreams = getBoolean("settings.performance.remove.range-check-streams-and-iterators", removeRangeCheckStreams); } @@ -775,7 +763,8 @@ index 51671e26df1d041e88484d9ab48e447ed227055d..12b9b7af94e2b1f2fdc936235a3a596c + } + + if (asyncPathfinding) { -+ LeavesLogger.LOGGER.severe("Async Pathfinding is updating, it may not work normally"); ++ asyncPathfinding = false; ++ LeavesLogger.LOGGER.severe("Async Pathfinding is updating, it can't work"); + } + } + diff --git a/patches/server/0041-Cache-climbing-check-for-activation.patch b/patches/server/0041-Cache-climbing-check-for-activation.patch index 944a31a3..2a4c20e8 100644 --- a/patches/server/0041-Cache-climbing-check-for-activation.patch +++ b/patches/server/0041-Cache-climbing-check-for-activation.patch @@ -46,10 +46,10 @@ index 40b382c2e0e33fe5c24a51b211cd2f9557a60c5e..5da7dc703aeaa4d7c325574ea9f6fd8c return 1; // Paper } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 12b9b7af94e2b1f2fdc936235a3a596ca18dc465..c4400ac886e04fb676d7478d3b3c8c4ce737a32a 100644 +index 84bbe8d232be70c87e460b5ef28fca1b7d17f32d..70756c650b1e891569a4910590770688552e1228 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -352,6 +352,11 @@ public final class LeavesConfig { +@@ -354,6 +354,11 @@ public final class LeavesConfig { } } diff --git a/patches/server/0042-Use-aging-cache-for-biome-temperatures.patch b/patches/server/0042-Use-aging-cache-for-biome-temperatures.patch index 6bb5e728..2348c93c 100644 --- a/patches/server/0042-Use-aging-cache-for-biome-temperatures.patch +++ b/patches/server/0042-Use-aging-cache-for-biome-temperatures.patch @@ -102,10 +102,10 @@ index ca259e278ad10347567c021376abca0287610432..968937e86bca8568a17988409506bcc0 public boolean shouldFreeze(LevelReader world, BlockPos blockPos) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index c4400ac886e04fb676d7478d3b3c8c4ce737a32a..f71a9fdeaeb392a1498d55c8d054d9febccb8398 100644 +index 70756c650b1e891569a4910590770688552e1228..c274f9068a2d317723f6b5da9348d73236a987fc 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -357,6 +357,15 @@ public final class LeavesConfig { +@@ -359,6 +359,15 @@ public final class LeavesConfig { cacheClimbCheck = getBoolean("settings.performance.cache-climb-check", cacheClimbCheck); } diff --git a/patches/server/0043-Reduce-entity-fluid-lookups-if-no-fluids.patch b/patches/server/0043-Reduce-entity-fluid-lookups-if-no-fluids.patch index fe689d95..6f725f2c 100644 --- a/patches/server/0043-Reduce-entity-fluid-lookups-if-no-fluids.patch +++ b/patches/server/0043-Reduce-entity-fluid-lookups-if-no-fluids.patch @@ -217,10 +217,10 @@ index b0c9fce9d4e06cac139e341d218d0b6aac1f1943..f53fee91b78ba4c1e17360a40d5a94fe }); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index f71a9fdeaeb392a1498d55c8d054d9febccb8398..f8b91874f2bc3fdf294ba479ee3b3b52429c1e70 100644 +index c274f9068a2d317723f6b5da9348d73236a987fc..ed73527cf29c4f08e3f4d98d968d5f5f489d357f 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -366,6 +366,11 @@ public final class LeavesConfig { +@@ -368,6 +368,11 @@ public final class LeavesConfig { } } diff --git a/patches/server/0044-Reduce-chunk-loading-lookups.patch b/patches/server/0044-Reduce-chunk-loading-lookups.patch index 486238ae..acbf64c6 100644 --- a/patches/server/0044-Reduce-chunk-loading-lookups.patch +++ b/patches/server/0044-Reduce-chunk-loading-lookups.patch @@ -42,10 +42,10 @@ index f22e615dba31619c97bf58930da060476a52facf..c330e65310821248409655953b88717f boolean flag1 = iblockdata.getFluidState().is(FluidTags.WATER); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index f8b91874f2bc3fdf294ba479ee3b3b52429c1e70..ff6806d2671d64eeafa9384ae136856bc9c0a10b 100644 +index ed73527cf29c4f08e3f4d98d968d5f5f489d357f..71a65447a60d8a0d265cfa4c47d0ab1f7437ac76 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -371,6 +371,11 @@ public final class LeavesConfig { +@@ -373,6 +373,11 @@ public final class LeavesConfig { reduceEntityFluidLookup = getBoolean("settings.performance.reduce-entity-fluid-lookup", reduceEntityFluidLookup); } diff --git a/patches/server/0045-Simpler-ShapelessRecipes-comparison-for-Vanilla.patch b/patches/server/0045-Simpler-ShapelessRecipes-comparison-for-Vanilla.patch index 148fafe4..f13a6ba9 100644 --- a/patches/server/0045-Simpler-ShapelessRecipes-comparison-for-Vanilla.patch +++ b/patches/server/0045-Simpler-ShapelessRecipes-comparison-for-Vanilla.patch @@ -72,10 +72,10 @@ index 0b3b46348ac9195bff1492ffc11fcbff7d3f5c6f..5d4a0081a69f9917aae15a9f2d3d2391 } } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index ff6806d2671d64eeafa9384ae136856bc9c0a10b..b8bf577bee9f53bf8652f99b9f6d15e3f6098d77 100644 +index 71a65447a60d8a0d265cfa4c47d0ab1f7437ac76..40d1d67172a90123a23020e71e06ced9d859d752 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -376,6 +376,11 @@ public final class LeavesConfig { +@@ -378,6 +378,11 @@ public final class LeavesConfig { reduceChuckLoadAndLookup = getBoolean("settings.performance.reduce-chuck-load-and-lookup", reduceChuckLoadAndLookup); }