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