From 93b9d3b03f9adc85b99902b555bef4591ece7e7e Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Mon, 4 Aug 2025 19:27:48 +0800 Subject: [PATCH] [ci skip] Update patch comment & Move unapplied patches to work folder --- .../features/0033-Linear-region-file-format.patch | 0 .../0033-Use-aging-cache-for-biome-temperatures.patch | 0 .../features}/0042-Optimize-Minecart-collisions.patch | 0 ...Don-t-trigger-lootable-refresh-for-non-player-intera.patch | 0 .../features}/0062-Add-missing-rewrite-rules.patch | 0 .../features}/0079-Cache-CubeVoxelShape-shape-array.patch | 0 .../features}/0079-Cache-ominous-banner-item.patch | 0 .../features/0079-Hide-specified-item-components.patch | 0 .../features}/0190-Lithium-equipment-tracking.patch | 0 ...Use-ensureCapacity-to-pre-populate-the-size-of-ticki.patch | 0 ...Directly-use-the-pre-filtered-ticking-chunks-list-as.patch | 0 ...Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch | 0 .../features}/0268-Cache-function-execution-result.patch | 0 .../features}/0270-Cache-potential-behaviors-in-Brain.patch | 0 .../0271-Use-ActivationList-on-runningBehaviors.patch | 0 .../dreeam/leaf/config/modules/misc/RegionFormatConfig.java | 0 .../linearpaper/region/EnumRegionFileExtension.java | 0 .../java/org/stupidcraft/linearpaper/region/IRegionFile.java | 0 .../stupidcraft/linearpaper/region/IRegionFileFactory.java | 0 .../org/stupidcraft/linearpaper/region/LinearRegionFile.java | 0 .../features/0170-Cache-blockstate-cache-array.patch | 4 ++++ 21 files changed, 4 insertions(+) rename leaf-archived-patches/{unapplied => work}/server/minecraft-patches/features/0033-Linear-region-file-format.patch (100%) rename leaf-archived-patches/work/server/{ => minecraft-patches/features}/0033-Use-aging-cache-for-biome-temperatures.patch (100%) rename leaf-archived-patches/work/server/{ => minecraft-patches/features}/0042-Optimize-Minecart-collisions.patch (100%) rename leaf-archived-patches/work/server/{ => minecraft-patches/features}/0046-Don-t-trigger-lootable-refresh-for-non-player-intera.patch (100%) rename leaf-archived-patches/work/server/{ => minecraft-patches/features}/0062-Add-missing-rewrite-rules.patch (100%) rename leaf-archived-patches/work/server/{ => minecraft-patches/features}/0079-Cache-CubeVoxelShape-shape-array.patch (100%) rename leaf-archived-patches/work/server/{ => minecraft-patches/features}/0079-Cache-ominous-banner-item.patch (100%) rename leaf-archived-patches/{unapplied => work}/server/minecraft-patches/features/0079-Hide-specified-item-components.patch (100%) rename leaf-archived-patches/work/server/{ => minecraft-patches/features}/0190-Lithium-equipment-tracking.patch (100%) rename leaf-archived-patches/work/server/{ => minecraft-patches/features}/0209-Use-ensureCapacity-to-pre-populate-the-size-of-ticki.patch (100%) rename leaf-archived-patches/work/server/{ => minecraft-patches/features}/0210-Directly-use-the-pre-filtered-ticking-chunks-list-as.patch (100%) rename leaf-archived-patches/work/server/{ => minecraft-patches/features}/0244-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch (100%) rename leaf-archived-patches/work/server/{ => minecraft-patches/features}/0268-Cache-function-execution-result.patch (100%) rename leaf-archived-patches/work/server/{ => minecraft-patches/features}/0270-Cache-potential-behaviors-in-Brain.patch (100%) rename leaf-archived-patches/work/server/{ => minecraft-patches/features}/0271-Use-ActivationList-on-runningBehaviors.patch (100%) rename leaf-archived-patches/{unapplied => work}/src/main/java/org/dreeam/leaf/config/modules/misc/RegionFormatConfig.java (100%) rename leaf-archived-patches/{unapplied => work}/src/main/java/org/stupidcraft/linearpaper/region/EnumRegionFileExtension.java (100%) rename leaf-archived-patches/{unapplied => work}/src/main/java/org/stupidcraft/linearpaper/region/IRegionFile.java (100%) rename leaf-archived-patches/{unapplied => work}/src/main/java/org/stupidcraft/linearpaper/region/IRegionFileFactory.java (100%) rename leaf-archived-patches/{unapplied => work}/src/main/java/org/stupidcraft/linearpaper/region/LinearRegionFile.java (100%) diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0033-Linear-region-file-format.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0033-Linear-region-file-format.patch similarity index 100% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0033-Linear-region-file-format.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0033-Linear-region-file-format.patch diff --git a/leaf-archived-patches/work/server/0033-Use-aging-cache-for-biome-temperatures.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0033-Use-aging-cache-for-biome-temperatures.patch similarity index 100% rename from leaf-archived-patches/work/server/0033-Use-aging-cache-for-biome-temperatures.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0033-Use-aging-cache-for-biome-temperatures.patch diff --git a/leaf-archived-patches/work/server/0042-Optimize-Minecart-collisions.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0042-Optimize-Minecart-collisions.patch similarity index 100% rename from leaf-archived-patches/work/server/0042-Optimize-Minecart-collisions.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0042-Optimize-Minecart-collisions.patch diff --git a/leaf-archived-patches/work/server/0046-Don-t-trigger-lootable-refresh-for-non-player-intera.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0046-Don-t-trigger-lootable-refresh-for-non-player-intera.patch similarity index 100% rename from leaf-archived-patches/work/server/0046-Don-t-trigger-lootable-refresh-for-non-player-intera.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0046-Don-t-trigger-lootable-refresh-for-non-player-intera.patch diff --git a/leaf-archived-patches/work/server/0062-Add-missing-rewrite-rules.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0062-Add-missing-rewrite-rules.patch similarity index 100% rename from leaf-archived-patches/work/server/0062-Add-missing-rewrite-rules.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0062-Add-missing-rewrite-rules.patch diff --git a/leaf-archived-patches/work/server/0079-Cache-CubeVoxelShape-shape-array.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0079-Cache-CubeVoxelShape-shape-array.patch similarity index 100% rename from leaf-archived-patches/work/server/0079-Cache-CubeVoxelShape-shape-array.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0079-Cache-CubeVoxelShape-shape-array.patch diff --git a/leaf-archived-patches/work/server/0079-Cache-ominous-banner-item.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0079-Cache-ominous-banner-item.patch similarity index 100% rename from leaf-archived-patches/work/server/0079-Cache-ominous-banner-item.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0079-Cache-ominous-banner-item.patch diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0079-Hide-specified-item-components.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0079-Hide-specified-item-components.patch similarity index 100% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0079-Hide-specified-item-components.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0079-Hide-specified-item-components.patch diff --git a/leaf-archived-patches/work/server/0190-Lithium-equipment-tracking.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0190-Lithium-equipment-tracking.patch similarity index 100% rename from leaf-archived-patches/work/server/0190-Lithium-equipment-tracking.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0190-Lithium-equipment-tracking.patch diff --git a/leaf-archived-patches/work/server/0209-Use-ensureCapacity-to-pre-populate-the-size-of-ticki.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0209-Use-ensureCapacity-to-pre-populate-the-size-of-ticki.patch similarity index 100% rename from leaf-archived-patches/work/server/0209-Use-ensureCapacity-to-pre-populate-the-size-of-ticki.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0209-Use-ensureCapacity-to-pre-populate-the-size-of-ticki.patch diff --git a/leaf-archived-patches/work/server/0210-Directly-use-the-pre-filtered-ticking-chunks-list-as.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0210-Directly-use-the-pre-filtered-ticking-chunks-list-as.patch similarity index 100% rename from leaf-archived-patches/work/server/0210-Directly-use-the-pre-filtered-ticking-chunks-list-as.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0210-Directly-use-the-pre-filtered-ticking-chunks-list-as.patch diff --git a/leaf-archived-patches/work/server/0244-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0244-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch similarity index 100% rename from leaf-archived-patches/work/server/0244-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0244-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch diff --git a/leaf-archived-patches/work/server/0268-Cache-function-execution-result.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0268-Cache-function-execution-result.patch similarity index 100% rename from leaf-archived-patches/work/server/0268-Cache-function-execution-result.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0268-Cache-function-execution-result.patch diff --git a/leaf-archived-patches/work/server/0270-Cache-potential-behaviors-in-Brain.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0270-Cache-potential-behaviors-in-Brain.patch similarity index 100% rename from leaf-archived-patches/work/server/0270-Cache-potential-behaviors-in-Brain.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0270-Cache-potential-behaviors-in-Brain.patch diff --git a/leaf-archived-patches/work/server/0271-Use-ActivationList-on-runningBehaviors.patch b/leaf-archived-patches/work/server/minecraft-patches/features/0271-Use-ActivationList-on-runningBehaviors.patch similarity index 100% rename from leaf-archived-patches/work/server/0271-Use-ActivationList-on-runningBehaviors.patch rename to leaf-archived-patches/work/server/minecraft-patches/features/0271-Use-ActivationList-on-runningBehaviors.patch diff --git a/leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/misc/RegionFormatConfig.java b/leaf-archived-patches/work/src/main/java/org/dreeam/leaf/config/modules/misc/RegionFormatConfig.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/misc/RegionFormatConfig.java rename to leaf-archived-patches/work/src/main/java/org/dreeam/leaf/config/modules/misc/RegionFormatConfig.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/stupidcraft/linearpaper/region/EnumRegionFileExtension.java b/leaf-archived-patches/work/src/main/java/org/stupidcraft/linearpaper/region/EnumRegionFileExtension.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/stupidcraft/linearpaper/region/EnumRegionFileExtension.java rename to leaf-archived-patches/work/src/main/java/org/stupidcraft/linearpaper/region/EnumRegionFileExtension.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/stupidcraft/linearpaper/region/IRegionFile.java b/leaf-archived-patches/work/src/main/java/org/stupidcraft/linearpaper/region/IRegionFile.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/stupidcraft/linearpaper/region/IRegionFile.java rename to leaf-archived-patches/work/src/main/java/org/stupidcraft/linearpaper/region/IRegionFile.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/stupidcraft/linearpaper/region/IRegionFileFactory.java b/leaf-archived-patches/work/src/main/java/org/stupidcraft/linearpaper/region/IRegionFileFactory.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/stupidcraft/linearpaper/region/IRegionFileFactory.java rename to leaf-archived-patches/work/src/main/java/org/stupidcraft/linearpaper/region/IRegionFileFactory.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/stupidcraft/linearpaper/region/LinearRegionFile.java b/leaf-archived-patches/work/src/main/java/org/stupidcraft/linearpaper/region/LinearRegionFile.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/stupidcraft/linearpaper/region/LinearRegionFile.java rename to leaf-archived-patches/work/src/main/java/org/stupidcraft/linearpaper/region/LinearRegionFile.java diff --git a/leaf-server/minecraft-patches/features/0170-Cache-blockstate-cache-array.patch b/leaf-server/minecraft-patches/features/0170-Cache-blockstate-cache-array.patch index 0a33c070..dc3f1b4e 100644 --- a/leaf-server/minecraft-patches/features/0170-Cache-blockstate-cache-array.patch +++ b/leaf-server/minecraft-patches/features/0170-Cache-blockstate-cache-array.patch @@ -3,6 +3,10 @@ From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:07:36 +0800 Subject: [PATCH] Cache blockstate cache array +Cache values to reduce allocations. +(See `Reduce array allocations` patch for full explanation) + +The JMH benchmark of this patch can be found in SunBox's `CachedEnumValuesForLoop` diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java index 331474bb33c8612283a0ec478c1ae8768180b22d..84f4d772bfe06383ca718b6a00d983e97e2e35f4 100644