Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly adopt upstream item EAR fix #11582

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion patches/server/0302-Fix-item-EAR-ticks.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0978-Entity-Activation-Range-2.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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 @@
Expand Down Expand Up @@ -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
Expand Down
Loading