mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
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.
This commit is contained in:
parent
0943517953
commit
422cd8d65d
2 changed files with 10 additions and 1 deletions
|
@ -669,7 +669,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
|
|
|
@ -24,6 +24,15 @@ diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -0,0 +0,0 @@ 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;
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public class ActivationRange
|
||||
}
|
||||
isActive = true;
|
||||
|
|
Loading…
Reference in a new issue