diff --git a/leaf-server/minecraft-patches/features/0099-Lithium-CompactSineLUT.patch b/leaf-server/minecraft-patches/features/0099-Lithium-CompactSineLUT.patch deleted file mode 100644 index 7816aab3..00000000 --- a/leaf-server/minecraft-patches/features/0099-Lithium-CompactSineLUT.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Taiyou06 -Date: Thu, 7 Nov 2024 23:51:51 +0100 -Subject: [PATCH] Lithium: CompactSineLUT - -This patch is based on the following mixin: -"net/caffeinemc/mods/lithium/mixin/math/sine_lut/MthMixin.java" -By: 2No2Name <2No2Name@web.de> -As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) -Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) - -diff --git a/net/minecraft/util/Mth.java b/net/minecraft/util/Mth.java -index 1b60fa34e4d6a5c00a983bf94e4d16d1eb46c665..1e93f74dece88509e56f077d07f67184335801b1 100644 ---- a/net/minecraft/util/Mth.java -+++ b/net/minecraft/util/Mth.java -@@ -46,11 +46,11 @@ public class Mth { - private static final double[] COS_TAB = new double[257]; - - public static float sin(float value) { -- return SIN[(int)(value * 10430.378F) & 65535]; -+ return org.dreeam.leaf.util.math.CompactSineLUT.sin(value); // Leaf - Lithium - CompactSineLUT - } - - public static float cos(float value) { -- return SIN[(int)(value * 10430.378F + 16384.0F) & 65535]; -+ return org.dreeam.leaf.util.math.CompactSineLUT.cos(value); // Leaf - Lithium - CompactSineLUT - } - - public static float sqrt(float value) { diff --git a/leaf-server/minecraft-patches/features/0100-Lithium-cached-iterate-outwards.patch b/leaf-server/minecraft-patches/features/0099-Lithium-cached-iterate-outwards.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0100-Lithium-cached-iterate-outwards.patch rename to leaf-server/minecraft-patches/features/0099-Lithium-cached-iterate-outwards.patch diff --git a/leaf-server/minecraft-patches/features/0101-Smooth-teleport-config.patch b/leaf-server/minecraft-patches/features/0100-Smooth-teleport-config.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0101-Smooth-teleport-config.patch rename to leaf-server/minecraft-patches/features/0100-Smooth-teleport-config.patch diff --git a/leaf-server/minecraft-patches/features/0102-Use-faster-and-thread-safe-ban-list-date-format-pars.patch b/leaf-server/minecraft-patches/features/0101-Use-faster-and-thread-safe-ban-list-date-format-pars.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0102-Use-faster-and-thread-safe-ban-list-date-format-pars.patch rename to leaf-server/minecraft-patches/features/0101-Use-faster-and-thread-safe-ban-list-date-format-pars.patch diff --git a/leaf-server/minecraft-patches/features/0103-Collect-then-startEachNonRunningBehavior-in-Brain.patch b/leaf-server/minecraft-patches/features/0102-Collect-then-startEachNonRunningBehavior-in-Brain.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0103-Collect-then-startEachNonRunningBehavior-in-Brain.patch rename to leaf-server/minecraft-patches/features/0102-Collect-then-startEachNonRunningBehavior-in-Brain.patch diff --git a/leaf-server/minecraft-patches/features/0104-Lithium-equipment-tracking.patch b/leaf-server/minecraft-patches/features/0103-Lithium-equipment-tracking.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0104-Lithium-equipment-tracking.patch rename to leaf-server/minecraft-patches/features/0103-Lithium-equipment-tracking.patch diff --git a/leaf-server/minecraft-patches/features/0105-C2ME-Optimize-world-gen-math.patch b/leaf-server/minecraft-patches/features/0104-C2ME-Optimize-world-gen-math.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0105-C2ME-Optimize-world-gen-math.patch rename to leaf-server/minecraft-patches/features/0104-C2ME-Optimize-world-gen-math.patch diff --git a/leaf-server/minecraft-patches/features/0106-Cache-chunk-key.patch b/leaf-server/minecraft-patches/features/0105-Cache-chunk-key.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0106-Cache-chunk-key.patch rename to leaf-server/minecraft-patches/features/0105-Cache-chunk-key.patch diff --git a/leaf-server/minecraft-patches/features/0107-Cache-random-tick-block-status.patch b/leaf-server/minecraft-patches/features/0106-Cache-random-tick-block-status.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0107-Cache-random-tick-block-status.patch rename to leaf-server/minecraft-patches/features/0106-Cache-random-tick-block-status.patch diff --git a/leaf-server/minecraft-patches/features/0108-Cache-part-of-canHoldFluid-result.patch b/leaf-server/minecraft-patches/features/0107-Cache-part-of-canHoldFluid-result.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0108-Cache-part-of-canHoldFluid-result.patch rename to leaf-server/minecraft-patches/features/0107-Cache-part-of-canHoldFluid-result.patch diff --git a/leaf-server/minecraft-patches/features/0109-Configurable-tripwire-dupe.patch b/leaf-server/minecraft-patches/features/0108-Configurable-tripwire-dupe.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0109-Configurable-tripwire-dupe.patch rename to leaf-server/minecraft-patches/features/0108-Configurable-tripwire-dupe.patch diff --git a/leaf-server/minecraft-patches/features/0110-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch b/leaf-server/minecraft-patches/features/0109-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0110-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch rename to leaf-server/minecraft-patches/features/0109-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch diff --git a/leaf-server/minecraft-patches/features/0111-Sepals-Rearrange-the-attackable-conditions.patch b/leaf-server/minecraft-patches/features/0110-Sepals-Rearrange-the-attackable-conditions.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0111-Sepals-Rearrange-the-attackable-conditions.patch rename to leaf-server/minecraft-patches/features/0110-Sepals-Rearrange-the-attackable-conditions.patch diff --git a/leaf-server/minecraft-patches/features/0112-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch b/leaf-server/minecraft-patches/features/0111-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0112-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch rename to leaf-server/minecraft-patches/features/0111-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch diff --git a/leaf-server/minecraft-patches/features/0113-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch b/leaf-server/minecraft-patches/features/0112-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0113-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch rename to leaf-server/minecraft-patches/features/0112-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch diff --git a/leaf-server/minecraft-patches/features/0114-Optimize-checking-nearby-players-for-spawning.patch b/leaf-server/minecraft-patches/features/0113-Optimize-checking-nearby-players-for-spawning.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0114-Optimize-checking-nearby-players-for-spawning.patch rename to leaf-server/minecraft-patches/features/0113-Optimize-checking-nearby-players-for-spawning.patch diff --git a/leaf-server/minecraft-patches/features/0115-Cache-supporting-block-check.patch b/leaf-server/minecraft-patches/features/0114-Cache-supporting-block-check.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0115-Cache-supporting-block-check.patch rename to leaf-server/minecraft-patches/features/0114-Cache-supporting-block-check.patch diff --git a/leaf-server/minecraft-patches/features/0116-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch b/leaf-server/minecraft-patches/features/0115-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0116-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch rename to leaf-server/minecraft-patches/features/0115-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch diff --git a/leaf-server/minecraft-patches/features/0117-Replace-brain-activity-maps-with-optimized-collectio.patch b/leaf-server/minecraft-patches/features/0116-Replace-brain-activity-maps-with-optimized-collectio.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0117-Replace-brain-activity-maps-with-optimized-collectio.patch rename to leaf-server/minecraft-patches/features/0116-Replace-brain-activity-maps-with-optimized-collectio.patch diff --git a/leaf-server/minecraft-patches/features/0118-Remove-stream-in-villagers.patch b/leaf-server/minecraft-patches/features/0117-Remove-stream-in-villagers.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0118-Remove-stream-in-villagers.patch rename to leaf-server/minecraft-patches/features/0117-Remove-stream-in-villagers.patch diff --git a/leaf-server/minecraft-patches/features/0119-Optimize-baby-villager-sensor.patch b/leaf-server/minecraft-patches/features/0118-Optimize-baby-villager-sensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0119-Optimize-baby-villager-sensor.patch rename to leaf-server/minecraft-patches/features/0118-Optimize-baby-villager-sensor.patch diff --git a/leaf-server/minecraft-patches/features/0120-Only-player-pushable.patch b/leaf-server/minecraft-patches/features/0119-Only-player-pushable.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0120-Only-player-pushable.patch rename to leaf-server/minecraft-patches/features/0119-Only-player-pushable.patch diff --git a/leaf-server/minecraft-patches/features/0121-Remove-iterators-from-Inventory-contains.patch b/leaf-server/minecraft-patches/features/0120-Remove-iterators-from-Inventory-contains.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0121-Remove-iterators-from-Inventory-contains.patch rename to leaf-server/minecraft-patches/features/0120-Remove-iterators-from-Inventory-contains.patch diff --git a/leaf-server/minecraft-patches/features/0122-Alternative-Brain-Behaviour.patch b/leaf-server/minecraft-patches/features/0121-Alternative-Brain-Behaviour.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0122-Alternative-Brain-Behaviour.patch rename to leaf-server/minecraft-patches/features/0121-Alternative-Brain-Behaviour.patch diff --git a/leaf-server/minecraft-patches/features/0123-Cache-eligible-players-for-despawn-checks.patch b/leaf-server/minecraft-patches/features/0122-Cache-eligible-players-for-despawn-checks.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0123-Cache-eligible-players-for-despawn-checks.patch rename to leaf-server/minecraft-patches/features/0122-Cache-eligible-players-for-despawn-checks.patch diff --git a/leaf-server/minecraft-patches/features/0124-Slightly-optimise-getNearestPlayer.patch b/leaf-server/minecraft-patches/features/0123-Slightly-optimise-getNearestPlayer.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0124-Slightly-optimise-getNearestPlayer.patch rename to leaf-server/minecraft-patches/features/0123-Slightly-optimise-getNearestPlayer.patch diff --git a/leaf-server/minecraft-patches/features/0125-Rewrite-queue-on-Connection.flushQueue.patch b/leaf-server/minecraft-patches/features/0124-Rewrite-queue-on-Connection.flushQueue.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0125-Rewrite-queue-on-Connection.flushQueue.patch rename to leaf-server/minecraft-patches/features/0124-Rewrite-queue-on-Connection.flushQueue.patch diff --git a/leaf-server/minecraft-patches/features/0126-ShreddedPaper-Don-t-block-main-thread-in-Connection-.patch b/leaf-server/minecraft-patches/features/0125-ShreddedPaper-Don-t-block-main-thread-in-Connection-.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0126-ShreddedPaper-Don-t-block-main-thread-in-Connection-.patch rename to leaf-server/minecraft-patches/features/0125-ShreddedPaper-Don-t-block-main-thread-in-Connection-.patch diff --git a/leaf-server/minecraft-patches/features/0127-Use-ensureCapacity-to-pre-populate-the-size-of-ticki.patch b/leaf-server/minecraft-patches/features/0126-Use-ensureCapacity-to-pre-populate-the-size-of-ticki.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0127-Use-ensureCapacity-to-pre-populate-the-size-of-ticki.patch rename to leaf-server/minecraft-patches/features/0126-Use-ensureCapacity-to-pre-populate-the-size-of-ticki.patch diff --git a/leaf-server/minecraft-patches/features/0128-Directly-use-the-pre-filtered-ticking-chunks-list-as.patch b/leaf-server/minecraft-patches/features/0127-Directly-use-the-pre-filtered-ticking-chunks-list-as.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0128-Directly-use-the-pre-filtered-ticking-chunks-list-as.patch rename to leaf-server/minecraft-patches/features/0127-Directly-use-the-pre-filtered-ticking-chunks-list-as.patch diff --git a/leaf-server/minecraft-patches/features/0129-Bulk-writes-to-writeLongArray-during-chunk-loading.patch b/leaf-server/minecraft-patches/features/0128-Bulk-writes-to-writeLongArray-during-chunk-loading.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0129-Bulk-writes-to-writeLongArray-during-chunk-loading.patch rename to leaf-server/minecraft-patches/features/0128-Bulk-writes-to-writeLongArray-during-chunk-loading.patch diff --git a/leaf-server/minecraft-patches/features/0130-Optimize-AABB.patch b/leaf-server/minecraft-patches/features/0129-Optimize-AABB.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0130-Optimize-AABB.patch rename to leaf-server/minecraft-patches/features/0129-Optimize-AABB.patch diff --git a/leaf-server/minecraft-patches/features/0131-Improve-sorting-in-SortedArraySet.patch b/leaf-server/minecraft-patches/features/0130-Improve-sorting-in-SortedArraySet.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0131-Improve-sorting-in-SortedArraySet.patch rename to leaf-server/minecraft-patches/features/0130-Improve-sorting-in-SortedArraySet.patch diff --git a/leaf-server/minecraft-patches/features/0132-Make-removeIf-slightly-faster.patch b/leaf-server/minecraft-patches/features/0131-Make-removeIf-slightly-faster.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0132-Make-removeIf-slightly-faster.patch rename to leaf-server/minecraft-patches/features/0131-Make-removeIf-slightly-faster.patch diff --git a/leaf-server/minecraft-patches/features/0133-Optimize-LinearPalette.patch b/leaf-server/minecraft-patches/features/0132-Optimize-LinearPalette.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0133-Optimize-LinearPalette.patch rename to leaf-server/minecraft-patches/features/0132-Optimize-LinearPalette.patch diff --git a/leaf-server/minecraft-patches/features/0134-Slightly-optimized-VarInt-write.patch b/leaf-server/minecraft-patches/features/0133-Slightly-optimized-VarInt-write.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0134-Slightly-optimized-VarInt-write.patch rename to leaf-server/minecraft-patches/features/0133-Slightly-optimized-VarInt-write.patch diff --git a/leaf-server/minecraft-patches/features/0135-Rewrite-ClientboundLightUpdatePacketData.patch b/leaf-server/minecraft-patches/features/0134-Rewrite-ClientboundLightUpdatePacketData.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0135-Rewrite-ClientboundLightUpdatePacketData.patch rename to leaf-server/minecraft-patches/features/0134-Rewrite-ClientboundLightUpdatePacketData.patch diff --git a/leaf-server/minecraft-patches/features/0136-Some-Optimizations-on-SerializableChunkData.patch b/leaf-server/minecraft-patches/features/0135-Some-Optimizations-on-SerializableChunkData.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0136-Some-Optimizations-on-SerializableChunkData.patch rename to leaf-server/minecraft-patches/features/0135-Some-Optimizations-on-SerializableChunkData.patch diff --git a/leaf-server/minecraft-patches/features/0137-Rework-ChunkHolderManager.patch b/leaf-server/minecraft-patches/features/0136-Rework-ChunkHolderManager.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0137-Rework-ChunkHolderManager.patch rename to leaf-server/minecraft-patches/features/0136-Rework-ChunkHolderManager.patch diff --git a/leaf-server/minecraft-patches/features/0138-Optimize-chunkUnload.patch b/leaf-server/minecraft-patches/features/0137-Optimize-chunkUnload.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0138-Optimize-chunkUnload.patch rename to leaf-server/minecraft-patches/features/0137-Optimize-chunkUnload.patch diff --git a/leaf-server/minecraft-patches/features/0139-Async-chunk-sending.patch b/leaf-server/minecraft-patches/features/0138-Async-chunk-sending.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0139-Async-chunk-sending.patch rename to leaf-server/minecraft-patches/features/0138-Async-chunk-sending.patch diff --git a/leaf-server/minecraft-patches/features/0140-Spawner-Configurations.patch b/leaf-server/minecraft-patches/features/0139-Spawner-Configurations.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0140-Spawner-Configurations.patch rename to leaf-server/minecraft-patches/features/0139-Spawner-Configurations.patch diff --git a/leaf-server/minecraft-patches/features/0141-SparklyPaper-Parallel-world-ticking.patch b/leaf-server/minecraft-patches/features/0140-SparklyPaper-Parallel-world-ticking.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0141-SparklyPaper-Parallel-world-ticking.patch rename to leaf-server/minecraft-patches/features/0140-SparklyPaper-Parallel-world-ticking.patch diff --git a/leaf-server/minecraft-patches/features/0142-SparklyPaper-Track-each-world-MSPT.patch b/leaf-server/minecraft-patches/features/0141-SparklyPaper-Track-each-world-MSPT.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0142-SparklyPaper-Track-each-world-MSPT.patch rename to leaf-server/minecraft-patches/features/0141-SparklyPaper-Track-each-world-MSPT.patch diff --git a/leaf-server/minecraft-patches/features/0143-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch b/leaf-server/minecraft-patches/features/0142-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0143-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch rename to leaf-server/minecraft-patches/features/0142-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch diff --git a/leaf-server/minecraft-patches/features/0144-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch b/leaf-server/minecraft-patches/features/0143-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0144-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch rename to leaf-server/minecraft-patches/features/0143-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch diff --git a/leaf-server/minecraft-patches/features/0145-Remove-streams-on-InsideBrownianWalk.patch b/leaf-server/minecraft-patches/features/0144-Remove-streams-on-InsideBrownianWalk.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0145-Remove-streams-on-InsideBrownianWalk.patch rename to leaf-server/minecraft-patches/features/0144-Remove-streams-on-InsideBrownianWalk.patch diff --git a/leaf-server/minecraft-patches/features/0146-Use-BFS-on-getSlopeDistance.patch b/leaf-server/minecraft-patches/features/0145-Use-BFS-on-getSlopeDistance.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0146-Use-BFS-on-getSlopeDistance.patch rename to leaf-server/minecraft-patches/features/0145-Use-BFS-on-getSlopeDistance.patch diff --git a/leaf-server/minecraft-patches/features/0147-Validate-recipe-display-index-before-retrieving-it.patch b/leaf-server/minecraft-patches/features/0146-Validate-recipe-display-index-before-retrieving-it.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0147-Validate-recipe-display-index-before-retrieving-it.patch rename to leaf-server/minecraft-patches/features/0146-Validate-recipe-display-index-before-retrieving-it.patch diff --git a/leaf-server/minecraft-patches/features/0148-Paper-PR-Throttle-failed-spawn-attempts.patch b/leaf-server/minecraft-patches/features/0147-Paper-PR-Throttle-failed-spawn-attempts.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0148-Paper-PR-Throttle-failed-spawn-attempts.patch rename to leaf-server/minecraft-patches/features/0147-Paper-PR-Throttle-failed-spawn-attempts.patch diff --git a/leaf-server/minecraft-patches/features/0149-Improve-BlockEntity-ticking-isRemoved-check.patch b/leaf-server/minecraft-patches/features/0148-Improve-BlockEntity-ticking-isRemoved-check.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0149-Improve-BlockEntity-ticking-isRemoved-check.patch rename to leaf-server/minecraft-patches/features/0148-Improve-BlockEntity-ticking-isRemoved-check.patch diff --git a/leaf-server/minecraft-patches/features/0150-Raytrace-AntiXray-SDK-integration.patch b/leaf-server/minecraft-patches/features/0149-Raytrace-AntiXray-SDK-integration.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0150-Raytrace-AntiXray-SDK-integration.patch rename to leaf-server/minecraft-patches/features/0149-Raytrace-AntiXray-SDK-integration.patch diff --git a/leaf-server/minecraft-patches/features/0151-Optimize-addOrUpdateTransientModifier.patch b/leaf-server/minecraft-patches/features/0150-Optimize-addOrUpdateTransientModifier.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0151-Optimize-addOrUpdateTransientModifier.patch rename to leaf-server/minecraft-patches/features/0150-Optimize-addOrUpdateTransientModifier.patch diff --git a/leaf-server/minecraft-patches/features/0152-Optimize-ContextMap.create.patch b/leaf-server/minecraft-patches/features/0151-Optimize-ContextMap.create.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0152-Optimize-ContextMap.create.patch rename to leaf-server/minecraft-patches/features/0151-Optimize-ContextMap.create.patch diff --git a/leaf-server/minecraft-patches/features/0153-Micro-optimizations-for-random-tick.patch b/leaf-server/minecraft-patches/features/0152-Micro-optimizations-for-random-tick.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0153-Micro-optimizations-for-random-tick.patch rename to leaf-server/minecraft-patches/features/0152-Micro-optimizations-for-random-tick.patch diff --git a/leaf-server/minecraft-patches/features/0154-Remove-streams-on-updateConnectedPlayersWithinRange.patch b/leaf-server/minecraft-patches/features/0153-Remove-streams-on-updateConnectedPlayersWithinRange.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0154-Remove-streams-on-updateConnectedPlayersWithinRange.patch rename to leaf-server/minecraft-patches/features/0153-Remove-streams-on-updateConnectedPlayersWithinRange.patch diff --git a/leaf-server/minecraft-patches/features/0155-Remove-streams-on-PlayerDetector.patch b/leaf-server/minecraft-patches/features/0154-Remove-streams-on-PlayerDetector.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0155-Remove-streams-on-PlayerDetector.patch rename to leaf-server/minecraft-patches/features/0154-Remove-streams-on-PlayerDetector.patch diff --git a/leaf-server/minecraft-patches/features/0156-AsyncBlockFinding.patch b/leaf-server/minecraft-patches/features/0155-AsyncBlockFinding.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0156-AsyncBlockFinding.patch rename to leaf-server/minecraft-patches/features/0155-AsyncBlockFinding.patch diff --git a/leaf-server/minecraft-patches/features/0157-Direct-iteration-on-Sensing.tick.patch b/leaf-server/minecraft-patches/features/0156-Direct-iteration-on-Sensing.tick.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0157-Direct-iteration-on-Sensing.tick.patch rename to leaf-server/minecraft-patches/features/0156-Direct-iteration-on-Sensing.tick.patch diff --git a/leaf-server/src/main/java/org/dreeam/leaf/util/math/CompactSineLUT.java b/leaf-server/src/main/java/org/dreeam/leaf/util/math/CompactSineLUT.java deleted file mode 100644 index d560b66d..00000000 --- a/leaf-server/src/main/java/org/dreeam/leaf/util/math/CompactSineLUT.java +++ /dev/null @@ -1,91 +0,0 @@ -package org.dreeam.leaf.util.math; - -import net.minecraft.util.Mth; - -/** - * A replacement for the sine angle lookup table used in {@link Mth}, both reducing the size of LUT and improving - * the access patterns for common paired sin/cos operations. - *

- * sin(-x) = -sin(x) - * ... to eliminate negative angles from the LUT. - *

- * sin(x) = sin(pi/2 - x) - * ... to eliminate supplementary angles from the LUT. - *

- * Using these identities allows us to reduce the LUT from 64K entries (256 KB) to just 16K entries (64 KB), enabling - * it to better fit into the CPU's caches at the expense of some cycles on the fast path. The implementation has been - * tightly optimized to avoid branching where possible and to use very quick integer operations. - *

- * Generally speaking, reducing the size of a lookup table is always a good optimization, but since we need to spend - * extra CPU cycles trying to maintain parity with vanilla, there is the potential risk that this implementation ends - * up being slower than vanilla when the lookup table is able to be kept in cache memory. - *

- * Unlike other "fast math" implementations, the values returned by this class are *bit-for-bit identical* with those - * from {@link Mth}. Validation is performed during runtime to ensure that the table is correct. - * - * @author coderbot16 Author of the original (and very clever) implementation in Rust: - * - * @author jellysquid3 Additional optimizations, port to Java - */ -public class CompactSineLUT { - - private static final int[] SINE_TABLE_INT = new int[16384 + 1]; - private static final float SINE_TABLE_MIDPOINT; - - static { - final float[] SINE_TABLE = Mth.SIN; - // Copy the sine table, covering to raw int bits - for (int i = 0; i < SINE_TABLE_INT.length; i++) { - SINE_TABLE_INT[i] = Float.floatToRawIntBits(SINE_TABLE[i]); - } - - SINE_TABLE_MIDPOINT = SINE_TABLE[SINE_TABLE.length / 2]; - - // Test that the lookup table is correct during runtime - for (int i = 0; i < SINE_TABLE.length; i++) { - float expected = SINE_TABLE[i]; - float value = lookup(i); - - if (expected != value) { - throw new IllegalArgumentException(String.format("LUT error at index %d (expected: %s, found: %s)", i, expected, value)); - } - } - } - - // [VanillaCopy] MathHelper#sin(float) - public static float sin(float f) { - return lookup((int) (f * 10430.378f) & 0xFFFF); - } - - // [VanillaCopy] MathHelper#cos(float) - public static float cos(float f) { - return lookup((int) (f * 10430.378f + 16384.0f) & 0xFFFF); - } - - private static float lookup(int index) { - // A special case... Is there some way to eliminate this? - if (index == 32768) { - return SINE_TABLE_MIDPOINT; - } - - // Trigonometric identity: sin(-x) = -sin(x) - // Given a domain of 0 <= x <= 2*pi, just negate the value if x > pi. - // This allows the sin table size to be halved. - int neg = (index & 0x8000) << 16; - - // All bits set if (pi/2 <= x), none set otherwise - // Extracts the 15th bit from 'half' - int mask = (index << 17) >> 31; - - // Trigonometric identity: sin(x) = sin(pi/2 - x) - int pos = (0x8001 & mask) + (index ^ mask); - - // Wrap the position in the table. Moving this down to immediately before the array access - // seems to help the Hotspot compiler optimize the bit math better. - pos &= 0x7fff; - - // Fetch the corresponding value from the LUT and invert the sign bit as needed - // This directly manipulate the sign bit on the float bits to simplify logic - return Float.intBitsToFloat(SINE_TABLE_INT[pos] ^ neg); - } -}