From c0f20000cf668cbe0e2bc95c1c47eec221048401 Mon Sep 17 00:00:00 2001 From: MrHua269 Date: Sat, 11 Jan 2025 18:41:51 +0800 Subject: [PATCH] Merge Paper #11945 for temporary hooper behavior fix A hopper optimization fix on Paper's pr : https://github.com/PaperMC/Paper/pull/11945 --- ...45-for-temporary-hooper-behavior-fix.patch | 21 +++++++++++++++++++ ...aiiju-Don-t-pathfind-outside-region.patch} | 0 ...ju-Vanilla-end-portal-teleportation.patch} | 0 ...iju-Entity-tick-and-removal-limiter.patch} | 0 ...ch => 0031-Petal-Reduce-sensor-work.patch} | 0 ...Cache-climbing-check-for-activation.patch} | 0 ...erfish-Reduce-chunk-loading-lookups.patch} | 0 ...per-6045-block-goal-shouldn-t-load-.patch} | 0 ...ish-Reduce-projectile-chunk-loading.patch} | 0 ...heck-for-spooky-season-once-an-hour.patch} | 0 ...037-Pufferfish-Optimize-suffocation.patch} | 0 ...ferfish-Dynamic-Activation-of-Brain.patch} | 0 ...le-goal-selector-during-inactive-ti.patch} | 0 ...h => 0040-Pufferfish-SIMD-Utilities.patch} | 0 ...try.patch => 0041-Pufferfish-Sentry.patch} | 0 ...le-Variable-entity-wake-up-duration.patch} | 0 ...=> 0043-Gale-Optimize-sun-burn-tick.patch} | 0 ...44-Gale-Use-platform-math-functions.patch} | 0 ...0045-Gale-Optimize-noise-generation.patch} | 0 ...a-and-Optional-allocation-in-Entity.patch} | 0 ...ttle-tracker-map-with-optimized-col.patch} | 0 ...kip-entity-move-if-movement-is-zero.patch} | 0 ...parkly-Paper-Optimize-canSee-checks.patch} | 0 ...-MapItem-update-if-the-map-does-not.patch} | 0 ...-distanceToSqr-call-in-ServerEntity.patch} | 0 ...I-and-display-of-chunkhot-in-tpsbar.patch} | 0 ...053-Leaf-Skip-event-if-no-listeners.patch} | 0 ...Secure-Seed-with-SecureSeed-command.patch} | 0 ...5-Purpur-use-alternative-keep-alive.patch} | 0 ...-start-tick-and-finished-tick-event.patch} | 0 ...x-MC-2025.patch => 0057-Fix-MC-2025.patch} | 0 ...=> 0058-FoliaPR-Add-TPS-From-Region.patch} | 0 32 files changed, 21 insertions(+) create mode 100644 patches/server/0027-Merge-Paper-11945-for-temporary-hooper-behavior-fix.patch rename patches/server/{0027-Kaiiju-Don-t-pathfind-outside-region.patch => 0028-Kaiiju-Don-t-pathfind-outside-region.patch} (100%) rename patches/server/{0028-Kaiiju-Vanilla-end-portal-teleportation.patch => 0029-Kaiiju-Vanilla-end-portal-teleportation.patch} (100%) rename patches/server/{0029-Kaiiju-Entity-tick-and-removal-limiter.patch => 0030-Kaiiju-Entity-tick-and-removal-limiter.patch} (100%) rename patches/server/{0030-Petal-Reduce-sensor-work.patch => 0031-Petal-Reduce-sensor-work.patch} (100%) rename patches/server/{0031-Pufferfish-Cache-climbing-check-for-activation.patch => 0032-Pufferfish-Cache-climbing-check-for-activation.patch} (100%) rename patches/server/{0032-Pufferfish-Reduce-chunk-loading-lookups.patch => 0033-Pufferfish-Reduce-chunk-loading-lookups.patch} (100%) rename patches/server/{0033-Pufferfish-Fix-Paper-6045-block-goal-shouldn-t-load-.patch => 0034-Pufferfish-Fix-Paper-6045-block-goal-shouldn-t-load-.patch} (100%) rename patches/server/{0034-Pufferfish-Reduce-projectile-chunk-loading.patch => 0035-Pufferfish-Reduce-projectile-chunk-loading.patch} (100%) rename patches/server/{0035-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch => 0036-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch} (100%) rename patches/server/{0036-Pufferfish-Optimize-suffocation.patch => 0037-Pufferfish-Optimize-suffocation.patch} (100%) rename patches/server/{0037-Pufferfish-Dynamic-Activation-of-Brain.patch => 0038-Pufferfish-Dynamic-Activation-of-Brain.patch} (100%) rename patches/server/{0038-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch => 0039-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch} (100%) rename patches/server/{0039-Pufferfish-SIMD-Utilities.patch => 0040-Pufferfish-SIMD-Utilities.patch} (100%) rename patches/server/{0040-Pufferfish-Sentry.patch => 0041-Pufferfish-Sentry.patch} (100%) rename patches/server/{0041-Gale-Variable-entity-wake-up-duration.patch => 0042-Gale-Variable-entity-wake-up-duration.patch} (100%) rename patches/server/{0042-Gale-Optimize-sun-burn-tick.patch => 0043-Gale-Optimize-sun-burn-tick.patch} (100%) rename patches/server/{0043-Gale-Use-platform-math-functions.patch => 0044-Gale-Use-platform-math-functions.patch} (100%) rename patches/server/{0044-Gale-Optimize-noise-generation.patch => 0045-Gale-Optimize-noise-generation.patch} (100%) rename patches/server/{0045-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch => 0046-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch} (100%) rename patches/server/{0046-Gale-Replace-throttle-tracker-map-with-optimized-col.patch => 0047-Gale-Replace-throttle-tracker-map-with-optimized-col.patch} (100%) rename patches/server/{0047-Gale-Skip-entity-move-if-movement-is-zero.patch => 0048-Gale-Skip-entity-move-if-movement-is-zero.patch} (100%) rename patches/server/{0048-Sparkly-Paper-Optimize-canSee-checks.patch => 0049-Sparkly-Paper-Optimize-canSee-checks.patch} (100%) rename patches/server/{0049-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch => 0050-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch} (100%) rename patches/server/{0050-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch => 0051-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch} (100%) rename patches/server/{0051-KioCG-Chunk-API-and-display-of-chunkhot-in-tpsbar.patch => 0052-KioCG-Chunk-API-and-display-of-chunkhot-in-tpsbar.patch} (100%) rename patches/server/{0052-Leaf-Skip-event-if-no-listeners.patch => 0053-Leaf-Skip-event-if-no-listeners.patch} (100%) rename patches/server/{0053-Leaf-Secure-Seed-with-SecureSeed-command.patch => 0054-Leaf-Secure-Seed-with-SecureSeed-command.patch} (100%) rename patches/server/{0054-Purpur-use-alternative-keep-alive.patch => 0055-Purpur-use-alternative-keep-alive.patch} (100%) rename patches/server/{0055-Threaded-region-start-tick-and-finished-tick-event.patch => 0056-Threaded-region-start-tick-and-finished-tick-event.patch} (100%) rename patches/server/{0056-Fix-MC-2025.patch => 0057-Fix-MC-2025.patch} (100%) rename patches/server/{0057-FoliaPR-Add-TPS-From-Region.patch => 0058-FoliaPR-Add-TPS-From-Region.patch} (100%) diff --git a/patches/server/0027-Merge-Paper-11945-for-temporary-hooper-behavior-fix.patch b/patches/server/0027-Merge-Paper-11945-for-temporary-hooper-behavior-fix.patch new file mode 100644 index 0000000..c9415f0 --- /dev/null +++ b/patches/server/0027-Merge-Paper-11945-for-temporary-hooper-behavior-fix.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MrHua269 +Date: Sat, 11 Jan 2025 18:41:11 +0800 +Subject: [PATCH] Merge Paper #11945 for temporary hooper behavior fix + +A hopper optimization fix on Paper's pr : https://github.com/PaperMC/Paper/pull/11945 + +diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java +index 44aae845da6cd34fc00e0c71795d6f610679bd4b..f0c2dae36d944f769082904301bcba91f2d0895f 100644 +--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java ++++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java +@@ -764,8 +764,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen + } else if (HopperBlockEntity.canMergeItems(itemstack1, stack)) { + int j = Math.min(stack.getMaxStackSize(), to.getMaxStackSize()) - itemstack1.getCount(); // Paper - Make hoppers respect inventory max stack size + int k = Math.min(stack.getCount(), j); +- +- stack.shrink(k); ++ stack.copy(true).shrink(k); // Paper - Perf: Optimize Hoppers + itemstack1.grow(k); + flag = k > 0; + } diff --git a/patches/server/0027-Kaiiju-Don-t-pathfind-outside-region.patch b/patches/server/0028-Kaiiju-Don-t-pathfind-outside-region.patch similarity index 100% rename from patches/server/0027-Kaiiju-Don-t-pathfind-outside-region.patch rename to patches/server/0028-Kaiiju-Don-t-pathfind-outside-region.patch diff --git a/patches/server/0028-Kaiiju-Vanilla-end-portal-teleportation.patch b/patches/server/0029-Kaiiju-Vanilla-end-portal-teleportation.patch similarity index 100% rename from patches/server/0028-Kaiiju-Vanilla-end-portal-teleportation.patch rename to patches/server/0029-Kaiiju-Vanilla-end-portal-teleportation.patch diff --git a/patches/server/0029-Kaiiju-Entity-tick-and-removal-limiter.patch b/patches/server/0030-Kaiiju-Entity-tick-and-removal-limiter.patch similarity index 100% rename from patches/server/0029-Kaiiju-Entity-tick-and-removal-limiter.patch rename to patches/server/0030-Kaiiju-Entity-tick-and-removal-limiter.patch diff --git a/patches/server/0030-Petal-Reduce-sensor-work.patch b/patches/server/0031-Petal-Reduce-sensor-work.patch similarity index 100% rename from patches/server/0030-Petal-Reduce-sensor-work.patch rename to patches/server/0031-Petal-Reduce-sensor-work.patch diff --git a/patches/server/0031-Pufferfish-Cache-climbing-check-for-activation.patch b/patches/server/0032-Pufferfish-Cache-climbing-check-for-activation.patch similarity index 100% rename from patches/server/0031-Pufferfish-Cache-climbing-check-for-activation.patch rename to patches/server/0032-Pufferfish-Cache-climbing-check-for-activation.patch diff --git a/patches/server/0032-Pufferfish-Reduce-chunk-loading-lookups.patch b/patches/server/0033-Pufferfish-Reduce-chunk-loading-lookups.patch similarity index 100% rename from patches/server/0032-Pufferfish-Reduce-chunk-loading-lookups.patch rename to patches/server/0033-Pufferfish-Reduce-chunk-loading-lookups.patch diff --git a/patches/server/0033-Pufferfish-Fix-Paper-6045-block-goal-shouldn-t-load-.patch b/patches/server/0034-Pufferfish-Fix-Paper-6045-block-goal-shouldn-t-load-.patch similarity index 100% rename from patches/server/0033-Pufferfish-Fix-Paper-6045-block-goal-shouldn-t-load-.patch rename to patches/server/0034-Pufferfish-Fix-Paper-6045-block-goal-shouldn-t-load-.patch diff --git a/patches/server/0034-Pufferfish-Reduce-projectile-chunk-loading.patch b/patches/server/0035-Pufferfish-Reduce-projectile-chunk-loading.patch similarity index 100% rename from patches/server/0034-Pufferfish-Reduce-projectile-chunk-loading.patch rename to patches/server/0035-Pufferfish-Reduce-projectile-chunk-loading.patch diff --git a/patches/server/0035-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch b/patches/server/0036-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch similarity index 100% rename from patches/server/0035-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch rename to patches/server/0036-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch diff --git a/patches/server/0036-Pufferfish-Optimize-suffocation.patch b/patches/server/0037-Pufferfish-Optimize-suffocation.patch similarity index 100% rename from patches/server/0036-Pufferfish-Optimize-suffocation.patch rename to patches/server/0037-Pufferfish-Optimize-suffocation.patch diff --git a/patches/server/0037-Pufferfish-Dynamic-Activation-of-Brain.patch b/patches/server/0038-Pufferfish-Dynamic-Activation-of-Brain.patch similarity index 100% rename from patches/server/0037-Pufferfish-Dynamic-Activation-of-Brain.patch rename to patches/server/0038-Pufferfish-Dynamic-Activation-of-Brain.patch diff --git a/patches/server/0038-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch b/patches/server/0039-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch similarity index 100% rename from patches/server/0038-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch rename to patches/server/0039-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch diff --git a/patches/server/0039-Pufferfish-SIMD-Utilities.patch b/patches/server/0040-Pufferfish-SIMD-Utilities.patch similarity index 100% rename from patches/server/0039-Pufferfish-SIMD-Utilities.patch rename to patches/server/0040-Pufferfish-SIMD-Utilities.patch diff --git a/patches/server/0040-Pufferfish-Sentry.patch b/patches/server/0041-Pufferfish-Sentry.patch similarity index 100% rename from patches/server/0040-Pufferfish-Sentry.patch rename to patches/server/0041-Pufferfish-Sentry.patch diff --git a/patches/server/0041-Gale-Variable-entity-wake-up-duration.patch b/patches/server/0042-Gale-Variable-entity-wake-up-duration.patch similarity index 100% rename from patches/server/0041-Gale-Variable-entity-wake-up-duration.patch rename to patches/server/0042-Gale-Variable-entity-wake-up-duration.patch diff --git a/patches/server/0042-Gale-Optimize-sun-burn-tick.patch b/patches/server/0043-Gale-Optimize-sun-burn-tick.patch similarity index 100% rename from patches/server/0042-Gale-Optimize-sun-burn-tick.patch rename to patches/server/0043-Gale-Optimize-sun-burn-tick.patch diff --git a/patches/server/0043-Gale-Use-platform-math-functions.patch b/patches/server/0044-Gale-Use-platform-math-functions.patch similarity index 100% rename from patches/server/0043-Gale-Use-platform-math-functions.patch rename to patches/server/0044-Gale-Use-platform-math-functions.patch diff --git a/patches/server/0044-Gale-Optimize-noise-generation.patch b/patches/server/0045-Gale-Optimize-noise-generation.patch similarity index 100% rename from patches/server/0044-Gale-Optimize-noise-generation.patch rename to patches/server/0045-Gale-Optimize-noise-generation.patch diff --git a/patches/server/0045-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch b/patches/server/0046-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch similarity index 100% rename from patches/server/0045-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch rename to patches/server/0046-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch diff --git a/patches/server/0046-Gale-Replace-throttle-tracker-map-with-optimized-col.patch b/patches/server/0047-Gale-Replace-throttle-tracker-map-with-optimized-col.patch similarity index 100% rename from patches/server/0046-Gale-Replace-throttle-tracker-map-with-optimized-col.patch rename to patches/server/0047-Gale-Replace-throttle-tracker-map-with-optimized-col.patch diff --git a/patches/server/0047-Gale-Skip-entity-move-if-movement-is-zero.patch b/patches/server/0048-Gale-Skip-entity-move-if-movement-is-zero.patch similarity index 100% rename from patches/server/0047-Gale-Skip-entity-move-if-movement-is-zero.patch rename to patches/server/0048-Gale-Skip-entity-move-if-movement-is-zero.patch diff --git a/patches/server/0048-Sparkly-Paper-Optimize-canSee-checks.patch b/patches/server/0049-Sparkly-Paper-Optimize-canSee-checks.patch similarity index 100% rename from patches/server/0048-Sparkly-Paper-Optimize-canSee-checks.patch rename to patches/server/0049-Sparkly-Paper-Optimize-canSee-checks.patch diff --git a/patches/server/0049-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch b/patches/server/0050-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch similarity index 100% rename from patches/server/0049-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch rename to patches/server/0050-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch diff --git a/patches/server/0050-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch b/patches/server/0051-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch similarity index 100% rename from patches/server/0050-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch rename to patches/server/0051-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch diff --git a/patches/server/0051-KioCG-Chunk-API-and-display-of-chunkhot-in-tpsbar.patch b/patches/server/0052-KioCG-Chunk-API-and-display-of-chunkhot-in-tpsbar.patch similarity index 100% rename from patches/server/0051-KioCG-Chunk-API-and-display-of-chunkhot-in-tpsbar.patch rename to patches/server/0052-KioCG-Chunk-API-and-display-of-chunkhot-in-tpsbar.patch diff --git a/patches/server/0052-Leaf-Skip-event-if-no-listeners.patch b/patches/server/0053-Leaf-Skip-event-if-no-listeners.patch similarity index 100% rename from patches/server/0052-Leaf-Skip-event-if-no-listeners.patch rename to patches/server/0053-Leaf-Skip-event-if-no-listeners.patch diff --git a/patches/server/0053-Leaf-Secure-Seed-with-SecureSeed-command.patch b/patches/server/0054-Leaf-Secure-Seed-with-SecureSeed-command.patch similarity index 100% rename from patches/server/0053-Leaf-Secure-Seed-with-SecureSeed-command.patch rename to patches/server/0054-Leaf-Secure-Seed-with-SecureSeed-command.patch diff --git a/patches/server/0054-Purpur-use-alternative-keep-alive.patch b/patches/server/0055-Purpur-use-alternative-keep-alive.patch similarity index 100% rename from patches/server/0054-Purpur-use-alternative-keep-alive.patch rename to patches/server/0055-Purpur-use-alternative-keep-alive.patch diff --git a/patches/server/0055-Threaded-region-start-tick-and-finished-tick-event.patch b/patches/server/0056-Threaded-region-start-tick-and-finished-tick-event.patch similarity index 100% rename from patches/server/0055-Threaded-region-start-tick-and-finished-tick-event.patch rename to patches/server/0056-Threaded-region-start-tick-and-finished-tick-event.patch diff --git a/patches/server/0056-Fix-MC-2025.patch b/patches/server/0057-Fix-MC-2025.patch similarity index 100% rename from patches/server/0056-Fix-MC-2025.patch rename to patches/server/0057-Fix-MC-2025.patch diff --git a/patches/server/0057-FoliaPR-Add-TPS-From-Region.patch b/patches/server/0058-FoliaPR-Add-TPS-From-Region.patch similarity index 100% rename from patches/server/0057-FoliaPR-Add-TPS-From-Region.patch rename to patches/server/0058-FoliaPR-Add-TPS-From-Region.patch