diff options
author | Bjarne Koll <[email protected]> | 2024-11-05 10:52:18 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-11-05 09:52:18 +0000 |
commit | 42a1901d3b318d276b625555831970a7813c39bc (patch) | |
tree | f001676a2475c151d4cdc389a21124a181b668f2 | |
parent | 93b435dbab92d071bd685c6d8dda9fd32c4c2990 (diff) | |
download | Paper-42a1901d3b318d276b625555831970a7813c39bc.tar.gz Paper-42a1901d3b318d276b625555831970a7813c39bc.zip |
Correctly adopt upstream item EAR fix (#11582)
EAR 2 evaluates the entities activity on the already incremented entity
tick. This diverges from spigots behaviour and hence needed adoption for
their item ear fix.
-rw-r--r-- | patches/server/0302-Fix-item-EAR-ticks.patch | 11 | ||||
-rw-r--r-- | patches/server/0978-Entity-Activation-Range-2.0.patch | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/patches/server/0302-Fix-item-EAR-ticks.patch b/patches/server/0302-Fix-item-EAR-ticks.patch index aef64b6c5a..f59d628d3b 100644 --- a/patches/server/0302-Fix-item-EAR-ticks.patch +++ b/patches/server/0302-Fix-item-EAR-ticks.patch @@ -21,9 +21,18 @@ index 75ebf09777e19645eee296a9edabac39c858ffb9..c21fa55c62d97d9511e41a1e313e9043 this.applyEffectsFromBlocks(); float f = 0.98F; diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index bd522080d17b5b470ec3ab42aa4ecc3082248c8a..964e3e81ab522ceebfceb651dfe3309d7b87c688 100644 +index bd522080d17b5b470ec3ab42aa4ecc3082248c8a..84ff1210e944ea9d1ec88874d218458773e341c9 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java +@@ -234,7 +234,7 @@ public class ActivationRange + public static boolean checkIfActive(Entity entity) + { + // Never safe to skip fireworks or item gravity +- if (entity instanceof FireworkRocketEntity || (entity instanceof ItemEntity && (entity.tickCount + entity.getId() + 1) % 4 == 0)) { ++ if (entity instanceof FireworkRocketEntity || (entity instanceof ItemEntity && (entity.tickCount + entity.getId()) % 4 == 0)) { // Paper - Needed for item gravity, see ItemEntity tick + return true; + } + @@ -253,11 +253,8 @@ public class ActivationRange } isActive = true; diff --git a/patches/server/0978-Entity-Activation-Range-2.0.patch b/patches/server/0978-Entity-Activation-Range-2.0.patch index 051ceaf599..6a41aace70 100644 --- a/patches/server/0978-Entity-Activation-Range-2.0.patch +++ b/patches/server/0978-Entity-Activation-Range-2.0.patch @@ -349,7 +349,7 @@ index 46afba838cf12eeb1bbccaa260131a76f090364b..e1c9a961064887070b29207efd7af478 } } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 964e3e81ab522ceebfceb651dfe3309d7b87c688..c1f753f7c4530a772fb408db83fc8c78675cbec2 100644 +index 84ff1210e944ea9d1ec88874d218458773e341c9..bd7c37123c70d2afdef252f39548725d4ef318ed 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -1,14 +1,22 @@ @@ -669,7 +669,7 @@ index 964e3e81ab522ceebfceb651dfe3309d7b87c688..c1f753f7c4530a772fb408db83fc8c78 /** @@ -237,8 +380,19 @@ public class ActivationRange - if (entity instanceof FireworkRocketEntity || (entity instanceof ItemEntity && (entity.tickCount + entity.getId() + 1) % 4 == 0)) { + if (entity instanceof FireworkRocketEntity || (entity instanceof ItemEntity && (entity.tickCount + entity.getId()) % 4 == 0)) { // Paper - Needed for item gravity, see ItemEntity tick return true; } + // Paper start - special case always immunities |