mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 13:57:35 +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
@ -669,7 +669,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -0,0 +0,0 @@ public class ActivationRange
|
@@ -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;
|
return true;
|
||||||
}
|
}
|
||||||
+ // Paper start - special case always immunities
|
+ // 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
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
+++ b/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
|
@@ -0,0 +0,0 @@ public class ActivationRange
|
||||||
}
|
}
|
||||||
isActive = true;
|
isActive = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user