From 035f9d71576522584dae333fba485752b1631de3 Mon Sep 17 00:00:00 2001 From: Hannes Greule Date: Sat, 7 Jan 2023 13:05:13 +0100 Subject: [PATCH] Fix items never falling after being on ground (#8768) --- patches/server/0338-Fix-items-not-falling-correctly.patch | 4 ++-- patches/server/0342-Entity-Activation-Range-2.0.patch | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/patches/server/0338-Fix-items-not-falling-correctly.patch b/patches/server/0338-Fix-items-not-falling-correctly.patch index 15d477738b..09bbb31668 100644 --- a/patches/server/0338-Fix-items-not-falling-correctly.patch +++ b/patches/server/0338-Fix-items-not-falling-correctly.patch @@ -28,7 +28,7 @@ index 02bd99934066b35a3f4fd59370cdabf0640ee218..477c9358a09067ace4d0fe3f519148fe float f1 = 0.98F; diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index e2dfc4d9a16a738dd0fe91838603e1d4370afa56..65a95703bb842d5aeacb606842621198c8aab7ab 100644 +index e2dfc4d9a16a738dd0fe91838603e1d4370afa56..08bf9f85fe02a3f89640a2f3ae23089a119a394a 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -257,7 +257,7 @@ public class ActivationRange @@ -36,7 +36,7 @@ index e2dfc4d9a16a738dd0fe91838603e1d4370afa56..65a95703bb842d5aeacb606842621198 } // Add a little performance juice to active entities. Skip 1/4 if not immune. - } else if ( !entity.defaultActivationState && entity.tickCount % 4 == 0 && !ActivationRange.checkEntityImmunities( entity ) ) -+ } else if ( !entity.defaultActivationState && (entity.tickCount + entity.getId()) % 4 == 3 && !ActivationRange.checkEntityImmunities( entity ) ) // Paper - Ensure checking item movement is offset from Spigot's entity activation range check ++ } else if ( !entity.defaultActivationState && (entity.tickCount + entity.getId()) % 4 == 0 && !ActivationRange.checkEntityImmunities( entity ) ) // Paper - Ensure checking item movement is offset from Spigot's entity activation range check { isActive = false; } diff --git a/patches/server/0342-Entity-Activation-Range-2.0.patch b/patches/server/0342-Entity-Activation-Range-2.0.patch index d8b96e1857..650c93aa2c 100644 --- a/patches/server/0342-Entity-Activation-Range-2.0.patch +++ b/patches/server/0342-Entity-Activation-Range-2.0.patch @@ -377,7 +377,7 @@ index 2f5f8e084c30bf654a19582e0b7baa9cde1b99b5..4f7b12d8f213d43f4ef5538b7e05809a } } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 65a95703bb842d5aeacb606842621198c8aab7ab..493ed4f58781c56a01a79ec4a8012528a357520d 100644 +index 08bf9f85fe02a3f89640a2f3ae23089a119a394a..f158fc8a151272428a33dc5f6e1742876edc80d5 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -1,39 +1,52 @@ @@ -740,8 +740,8 @@ index 65a95703bb842d5aeacb606842621198c8aab7ab..493ed4f58781c56a01a79ec4a8012528 + } // Add a little performance juice to active entities. Skip 1/4 if not immune. -- } else if ( !entity.defaultActivationState && (entity.tickCount + entity.getId()) % 4 == 3 && !ActivationRange.checkEntityImmunities( entity ) ) // Paper - Ensure checking item movement is offset from Spigot's entity activation range check -+ } else if ( (entity.tickCount + entity.getId()) % 4 == 3 && ActivationRange.checkEntityImmunities( entity ) < 0 ) // Paper +- } else if ( !entity.defaultActivationState && (entity.tickCount + entity.getId()) % 4 == 0 && !ActivationRange.checkEntityImmunities( entity ) ) // Paper - Ensure checking item movement is offset from Spigot's entity activation range check ++ } else if ( (entity.tickCount + entity.getId()) % 4 == 0 && ActivationRange.checkEntityImmunities( entity ) < 0 ) // Paper { isActive = false; }