diff --git a/patches/server/0068-Replace-division-by-multiplication-in-CubePointRange.patch b/patches/server/0068-Replace-division-by-multiplication-in-CubePointRange.patch new file mode 100644 index 0000000..dccf7e1 --- /dev/null +++ b/patches/server/0068-Replace-division-by-multiplication-in-CubePointRange.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MartijnMuijsers +Date: Wed, 30 Nov 2022 17:24:24 +0100 +Subject: [PATCH] Replace division by multiplication in CubePointRange + +License: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) + +This patch is based on the following mixin: +"shapes/precompute_shape_arrays/FractionalDoubleListMixin" +Original commit: "fix: VoxelShapeAlignedCuboid.getPointPositions different from vanilla [...]" +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.nl.html) + +diff --git a/src/main/java/net/minecraft/world/phys/shapes/CubePointRange.java b/src/main/java/net/minecraft/world/phys/shapes/CubePointRange.java +index a544db042c8d2ecec8d323770552c4f10ca758a6..e7bffb7f757dbeac255676823de6464329f2f535 100644 +--- a/src/main/java/net/minecraft/world/phys/shapes/CubePointRange.java ++++ b/src/main/java/net/minecraft/world/phys/shapes/CubePointRange.java +@@ -4,6 +4,7 @@ import it.unimi.dsi.fastutil.doubles.AbstractDoubleList; + + public class CubePointRange extends AbstractDoubleList { + private final int parts; ++ private final double scale; // Gale - Lithium - replace division by multiplication in CubePointRange + + CubePointRange(int sectionCount) { + if (sectionCount <= 0) { +@@ -11,10 +12,11 @@ public class CubePointRange extends AbstractDoubleList { + } else { + this.parts = sectionCount; + } ++ this.scale = 1.0D / sectionCount; // Gale - Lithium - replace division by multiplication in CubePointRange + } + + public double getDouble(int i) { +- return (double)i / (double)this.parts; ++ return i * this.scale; // Gale - Lithium - replace division by multiplication in CubePointRange + } + + public int size() { diff --git a/patches/server/0068-Skip-entity-move-if-movement-is-zero.patch b/patches/server/0069-Skip-entity-move-if-movement-is-zero.patch similarity index 100% rename from patches/server/0068-Skip-entity-move-if-movement-is-zero.patch rename to patches/server/0069-Skip-entity-move-if-movement-is-zero.patch diff --git a/patches/server/0069-Ignore-durability-change-equipment-updates.patch b/patches/server/0070-Ignore-durability-change-equipment-updates.patch similarity index 100% rename from patches/server/0069-Ignore-durability-change-equipment-updates.patch rename to patches/server/0070-Ignore-durability-change-equipment-updates.patch diff --git a/patches/server/0070-Hide-flames-on-entities-with-fire-resistance.patch b/patches/server/0071-Hide-flames-on-entities-with-fire-resistance.patch similarity index 100% rename from patches/server/0070-Hide-flames-on-entities-with-fire-resistance.patch rename to patches/server/0071-Hide-flames-on-entities-with-fire-resistance.patch diff --git a/patches/server/0071-Skip-cloning-advancement-criteria.patch b/patches/server/0072-Skip-cloning-advancement-criteria.patch similarity index 100% rename from patches/server/0071-Skip-cloning-advancement-criteria.patch rename to patches/server/0072-Skip-cloning-advancement-criteria.patch diff --git a/patches/server/0072-Player-canSee-by-entity-UUID.patch b/patches/server/0073-Player-canSee-by-entity-UUID.patch similarity index 100% rename from patches/server/0072-Player-canSee-by-entity-UUID.patch rename to patches/server/0073-Player-canSee-by-entity-UUID.patch diff --git a/patches/server/0073-Spread-out-sending-all-player-info.patch b/patches/server/0074-Spread-out-sending-all-player-info.patch similarity index 100% rename from patches/server/0073-Spread-out-sending-all-player-info.patch rename to patches/server/0074-Spread-out-sending-all-player-info.patch diff --git a/patches/server/0074-Optimize-player-list-for-sending-player-info.patch b/patches/server/0075-Optimize-player-list-for-sending-player-info.patch similarity index 100% rename from patches/server/0074-Optimize-player-list-for-sending-player-info.patch rename to patches/server/0075-Optimize-player-list-for-sending-player-info.patch diff --git a/patches/server/0075-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch b/patches/server/0076-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch similarity index 100% rename from patches/server/0075-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch rename to patches/server/0076-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch diff --git a/patches/server/0076-Send-multiple-keep-alive-packets.patch b/patches/server/0077-Send-multiple-keep-alive-packets.patch similarity index 100% rename from patches/server/0076-Send-multiple-keep-alive-packets.patch rename to patches/server/0077-Send-multiple-keep-alive-packets.patch diff --git a/patches/server/0077-Specific-interval-TPS-API.patch b/patches/server/0078-Specific-interval-TPS-API.patch similarity index 100% rename from patches/server/0077-Specific-interval-TPS-API.patch rename to patches/server/0078-Specific-interval-TPS-API.patch diff --git a/patches/server/0078-5-second-TPS-average.patch b/patches/server/0079-5-second-TPS-average.patch similarity index 100% rename from patches/server/0078-5-second-TPS-average.patch rename to patches/server/0079-5-second-TPS-average.patch diff --git a/patches/server/0079-Measure-last-tick-time.patch b/patches/server/0080-Measure-last-tick-time.patch similarity index 100% rename from patches/server/0079-Measure-last-tick-time.patch rename to patches/server/0080-Measure-last-tick-time.patch diff --git a/patches/server/0080-Last-tick-time-API.patch b/patches/server/0081-Last-tick-time-API.patch similarity index 100% rename from patches/server/0080-Last-tick-time-API.patch rename to patches/server/0081-Last-tick-time-API.patch diff --git a/patches/server/0081-Show-last-tick-time-in-tps-command.patch b/patches/server/0082-Show-last-tick-time-in-tps-command.patch similarity index 100% rename from patches/server/0081-Show-last-tick-time-in-tps-command.patch rename to patches/server/0082-Show-last-tick-time-in-tps-command.patch diff --git a/patches/server/0082-Collision-physics-check-before-vehicle-check.patch b/patches/server/0083-Collision-physics-check-before-vehicle-check.patch similarity index 100% rename from patches/server/0082-Collision-physics-check-before-vehicle-check.patch rename to patches/server/0083-Collision-physics-check-before-vehicle-check.patch diff --git a/patches/server/0083-Variable-main-thread-task-delay.patch b/patches/server/0084-Variable-main-thread-task-delay.patch similarity index 100% rename from patches/server/0083-Variable-main-thread-task-delay.patch rename to patches/server/0084-Variable-main-thread-task-delay.patch diff --git a/patches/server/0084-Reduce-RandomSource-instances.patch b/patches/server/0085-Reduce-RandomSource-instances.patch similarity index 100% rename from patches/server/0084-Reduce-RandomSource-instances.patch rename to patches/server/0085-Reduce-RandomSource-instances.patch diff --git a/patches/server/0085-CPU-cores-estimation.patch b/patches/server/0086-CPU-cores-estimation.patch similarity index 100% rename from patches/server/0085-CPU-cores-estimation.patch rename to patches/server/0086-CPU-cores-estimation.patch diff --git a/patches/server/0086-Add-centralized-AsyncExecutor.patch b/patches/server/0087-Add-centralized-AsyncExecutor.patch similarity index 100% rename from patches/server/0086-Add-centralized-AsyncExecutor.patch rename to patches/server/0087-Add-centralized-AsyncExecutor.patch diff --git a/patches/server/0087-Remove-Paper-async-executor.patch b/patches/server/0088-Remove-Paper-async-executor.patch similarity index 100% rename from patches/server/0087-Remove-Paper-async-executor.patch rename to patches/server/0088-Remove-Paper-async-executor.patch diff --git a/patches/server/0088-Remove-Paper-cleaner-executor.patch b/patches/server/0089-Remove-Paper-cleaner-executor.patch similarity index 100% rename from patches/server/0088-Remove-Paper-cleaner-executor.patch rename to patches/server/0089-Remove-Paper-cleaner-executor.patch diff --git a/patches/server/0089-Remove-background-executor.patch b/patches/server/0090-Remove-background-executor.patch similarity index 100% rename from patches/server/0089-Remove-background-executor.patch rename to patches/server/0090-Remove-background-executor.patch diff --git a/patches/server/0090-Remove-bootstrap-executor.patch b/patches/server/0091-Remove-bootstrap-executor.patch similarity index 100% rename from patches/server/0090-Remove-bootstrap-executor.patch rename to patches/server/0091-Remove-bootstrap-executor.patch diff --git a/patches/server/0091-Remove-world-upgrade-executors.patch b/patches/server/0092-Remove-world-upgrade-executors.patch similarity index 100% rename from patches/server/0091-Remove-world-upgrade-executors.patch rename to patches/server/0092-Remove-world-upgrade-executors.patch diff --git a/patches/server/0092-Remove-tab-complete-executor.patch b/patches/server/0093-Remove-tab-complete-executor.patch similarity index 100% rename from patches/server/0092-Remove-tab-complete-executor.patch rename to patches/server/0093-Remove-tab-complete-executor.patch diff --git a/patches/server/0093-Remove-text-filter-executor.patch b/patches/server/0094-Remove-text-filter-executor.patch similarity index 100% rename from patches/server/0093-Remove-text-filter-executor.patch rename to patches/server/0094-Remove-text-filter-executor.patch