diff --git a/patches/server/0008-Gale-semantic-version.patch b/patches/server/0008-Gale-semantic-version.patch index 63a370b..939ec80 100644 --- a/patches/server/0008-Gale-semantic-version.patch +++ b/patches/server/0008-Gale-semantic-version.patch @@ -29,7 +29,7 @@ index 2868dab7b100d9c325b0e5056f86660d631dec4b..2acad4c3fd58178b0f8b22bdb04eeeeb } diff --git a/src/main/java/org/galemc/gale/version/GaleSemanticVersion.java b/src/main/java/org/galemc/gale/version/GaleSemanticVersion.java new file mode 100644 -index 0000000000000000000000000000000000000000..9bee7629dd00453dc4a712f3c48cf4f2ae3da5c5 +index 0000000000000000000000000000000000000000..4c0ae932fd4ecc4ec103b19b32d0eb4ebef3cb74 --- /dev/null +++ b/src/main/java/org/galemc/gale/version/GaleSemanticVersion.java @@ -0,0 +1,37 @@ @@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..9bee7629dd00453dc4a712f3c48cf4f2 + * The patch version is incremented for small changes that do not affect the goal of any feature, + * such as bug fixes, performance improvements or changes in wording. + */ -+ public static final @NotNull String version = "0.6.5"; ++ public static final @NotNull String version = "0.6.6"; + + /** + * The "major.minor" portion of the {@link #version}. diff --git a/patches/server/0020-Faster-floating-point-positive-modulo.patch b/patches/server/0020-Faster-floating-point-positive-modulo.patch index ff51b28..5bb30cb 100644 --- a/patches/server/0020-Faster-floating-point-positive-modulo.patch +++ b/patches/server/0020-Faster-floating-point-positive-modulo.patch @@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/util/Mth.java b/src/main/java/net/minecraft/util/Mth.java -index 7327f3bb1c1f764ae1da88af27b1e9fb03fb89d9..aaefd728bb1a9fc398e55fe30c9337d51cf43785 100644 +index 7327f3bb1c1f764ae1da88af27b1e9fb03fb89d9..72ede18890a7bf3dba1473e10319339ac0bbfa69 100644 --- a/src/main/java/net/minecraft/util/Mth.java +++ b/src/main/java/net/minecraft/util/Mth.java @@ -139,14 +139,26 @@ public class Mth { @@ -25,12 +25,12 @@ index 7327f3bb1c1f764ae1da88af27b1e9fb03fb89d9..aaefd728bb1a9fc398e55fe30c9337d5 } + // Gale start - faster floating-point positive modulo -+ public static float positiveModuloForPositiveDivisor(float dividend, float divisor) { ++ public static float positiveModuloForPositiveIntegerDivisor(float dividend, float divisor) { + var modulo = dividend % divisor; + return modulo < 0 ? modulo + divisor : modulo; + } + -+ public static double positiveModuloForPositiveDivisor(double dividend, double divisor) { ++ public static double positiveModuloForPositiveIntegerDivisor(double dividend, double divisor) { + var modulo = dividend % divisor; + return modulo < 0 ? modulo + divisor : modulo; + } @@ -40,7 +40,7 @@ index 7327f3bb1c1f764ae1da88af27b1e9fb03fb89d9..aaefd728bb1a9fc398e55fe30c9337d5 return a % b == 0; } diff --git a/src/main/java/net/minecraft/world/level/levelgen/blending/Blender.java b/src/main/java/net/minecraft/world/level/levelgen/blending/Blender.java -index a6434f2c2d1ddb33e7c51d0a099fd127d8a785e6..aeecd8fc0b9d514990e1fa1f1c790fa61d664a0b 100644 +index a6434f2c2d1ddb33e7c51d0a099fd127d8a785e6..a7972d196c354ff175728f2b8e99590181c65451 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/blending/Blender.java +++ b/src/main/java/net/minecraft/world/level/levelgen/blending/Blender.java @@ -141,7 +141,7 @@ public class Blender { @@ -48,7 +48,7 @@ index a6434f2c2d1ddb33e7c51d0a099fd127d8a785e6..aeecd8fc0b9d514990e1fa1f1c790fa6 double d = 1.0D; double e = height + 0.5D; - double f = Mth.positiveModulo(e, 8.0D); -+ double f = Mth.positiveModuloForPositiveDivisor(e, 8.0D); // Gale - faster floating-point positive modulo ++ double f = Mth.positiveModuloForPositiveIntegerDivisor(e, 8.0D); // Gale - faster floating-point positive modulo return 1.0D * (32.0D * (e - 128.0D) - 3.0D * (e - 120.0D) * f + 3.0D * f * f) / (128.0D * (32.0D - 3.0D * f)); } diff --git a/patches/server/0144-Initialize-line-of-sight-cache-with-low-capacity.patch b/patches/server/0144-Initialize-line-of-sight-cache-with-low-capacity.patch new file mode 100644 index 0000000..20ea401 --- /dev/null +++ b/patches/server/0144-Initialize-line-of-sight-cache-with-low-capacity.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Martijn Muijsers +Date: Wed, 30 Aug 2023 19:01:50 +0200 +Subject: [PATCH] Initialize line of sight cache with low capacity + +License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) +Gale - https://galemc.org + +diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java +index ed440b9a84ac0e4619c075491515fa072d6aebec..57472cb54e9fd83e980e3c57f28d6e6643f422e8 100644 +--- a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java ++++ b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensing.java +@@ -7,8 +7,10 @@ import net.minecraft.world.entity.Mob; + + public class Sensing { + private final Mob mob; +- private final IntSet seen = new IntOpenHashSet(); +- private final IntSet unseen = new IntOpenHashSet(); ++ // Gale start - initialize line of sight cache with low capacity ++ private final IntSet seen = new IntOpenHashSet(2); ++ private final IntSet unseen = new IntOpenHashSet(2); ++ // Gale end - initialize line of sight cache with low capacity + + public Sensing(Mob owner) { + this.mob = owner; diff --git a/patches/server/0144-Server-thread-priority-environment-variable.patch b/patches/server/0145-Server-thread-priority-environment-variable.patch similarity index 100% rename from patches/server/0144-Server-thread-priority-environment-variable.patch rename to patches/server/0145-Server-thread-priority-environment-variable.patch diff --git a/patches/server/0145-Instantly-continue-on-world-upgrade-finish.patch b/patches/server/0146-Instantly-continue-on-world-upgrade-finish.patch similarity index 100% rename from patches/server/0145-Instantly-continue-on-world-upgrade-finish.patch rename to patches/server/0146-Instantly-continue-on-world-upgrade-finish.patch diff --git a/patches/server/0146-Virtual-thread-support.patch b/patches/server/0147-Virtual-thread-support.patch similarity index 100% rename from patches/server/0146-Virtual-thread-support.patch rename to patches/server/0147-Virtual-thread-support.patch