From 4caecfe4ce9128f488d76b9c07f1a1605b8cde17 Mon Sep 17 00:00:00 2001
From: Andrew Mollenkamp <34605013+AJMFactsheets@users.noreply.github.com>
Date: Mon, 20 Jan 2020 09:57:12 -0600
Subject: [PATCH] Fix items not falling correctly (Resolves #2835) (#2872)

---
 .../Fix-items-not-falling-correctly.patch     | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Spigot-Server-Patches/Fix-items-not-falling-correctly.patch

diff --git a/Spigot-Server-Patches/Fix-items-not-falling-correctly.patch b/Spigot-Server-Patches/Fix-items-not-falling-correctly.patch
new file mode 100644
index 0000000000..cf5393391e
--- /dev/null
+++ b/Spigot-Server-Patches/Fix-items-not-falling-correctly.patch
@@ -0,0 +1,30 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: AJMFactsheets <AJMFactsheets@gmail.com>
+Date: Fri, 17 Jan 2020 17:17:54 -0600
+Subject: [PATCH] Fix items not falling correctly
+
+Since 1.14, Mojang has added an optimization which skips checking if 
+an item should fall every fourth tick.
+
+However, Spigot's entity activation range class also has an
+optimization which skips ticking active entities every fourth tick.
+This can result in a state where an item will never properly fall
+due to its move method never being called.
+
+This patch resolves the conflict by offsetting checking an item's
+move method from Spigot's entity activation range check.
+
+diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
+index e61af3f5..30a7843b 100644
+--- a/src/main/java/net/minecraft/server/EntityItem.java
++++ b/src/main/java/net/minecraft/server/EntityItem.java
+@@ -0,0 +0,0 @@ public class EntityItem extends Entity {
+                 }
+             }
+ 
+-            if (!this.onGround || b(this.getMot()) > 9.999999747378752E-6D || (this.ticksLived + this.getId()) % 4 == 0) {
++            if (!this.onGround || b(this.getMot()) > 9.999999747378752E-6D || this.ticksLived % 4 == 3) { // Paper - Ensure checking item movement is always offset from Spigot's entity activation range check
+                 this.move(EnumMoveType.SELF, this.getMot());
+                 float f = 0.98F;
+ 
+--
\ No newline at end of file