From eb3975884836fce986d6affc9a258ea9046e7833 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Mar 2019 18:15:39 -0400 Subject: [PATCH] missed a spot for pickupDelay fix --- ...o-below-0-for-pickupDelay-breaks-picking-up-i.patch | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/Spigot-Server-Patches/don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch index f10445cca5..d23ba113d6 100644 --- a/Spigot-Server-Patches/don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch +++ b/Spigot-Server-Patches/don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch @@ -6,7 +6,7 @@ Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items vanilla checks for == 0 diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index e723bd339..cf00d0c88 100644 +index e723bd339..5f6e81372 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 { @@ -17,4 +17,12 @@ index e723bd339..cf00d0c88 100644 if (this.age != -32768) this.age += elapsedTicks; this.lastTick = MinecraftServer.currentTick; // CraftBukkit end +@@ -0,0 +0,0 @@ public class EntityItem extends Entity { + // CraftBukkit start - Use wall time for pickup and despawn timers + int elapsedTicks = MinecraftServer.currentTick - this.lastTick; + if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks; ++ this.pickupDelay = Math.max(0, this.pickupDelay); // Paper - don't go below 0 + if (this.age != -32768) this.age += elapsedTicks; + this.lastTick = MinecraftServer.currentTick; + // CraftBukkit end -- \ No newline at end of file