From 745476f4dadbbc7b567307271be859dc7bd3cbba Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Mar 2019 18:09:51 -0400 Subject: don't go below 0 for pickupDelay, breaks picking up items vanilla checks for == 0 Fixes #1911 --- ...low-0-for-pickupDelay-breaks-picking-up-i.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Spigot-Server-Patches/0380-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch diff --git a/Spigot-Server-Patches/0380-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/Spigot-Server-Patches/0380-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch new file mode 100644 index 0000000000..a0b37e16e1 --- /dev/null +++ b/Spigot-Server-Patches/0380-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch @@ -0,0 +1,22 @@ +From e6a5d8a54a604baab979eb2219656538a43aa72c Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sun, 24 Mar 2019 18:08:36 -0400 +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 099bc7551..2c99cc2f1 100644 +--- a/src/main/java/net/minecraft/server/EntityItem.java ++++ b/src/main/java/net/minecraft/server/EntityItem.java +@@ -72,6 +72,7 @@ public class EntityItem extends Entity implements HopperPusher { + // 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 +-- +2.21.0 + -- cgit v1.2.3